Repository navigation
Expand file tree
/
Copy pathseekgun.lua
More file actions
135 lines (106 loc) · 5.16 KB
/
Copy pathseekgun.lua
File metadata and controls
135 lines (106 loc) · 5.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
-- hi, this is old code
-- i wont bother to create a raycast for the jeff puddle, im too lazy
local Functions = loadstring(game:HttpGet("https://raw.githubusercontent.com/RegularVynixu/Utilities/main/Functions.lua"))()
local tweenService = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local seekGun = game:GetObjects("rbxassetid://13386404155")[1] or LoadCustomInstance("https://raw.githubusercontent.com/persopoiu/scripts/main/SeekGunAssets/SeekPistol.rbxm")
local seekAmmo = game:GetObjects("rbxassetid://13386436753")[1] or LoadCustomInstance("https://raw.githubusercontent.com/persopoiu/scripts/main/SeekGunAssets/SeekAmmo.rbxm")
local seekPuddle = game:GetObjects("rbxassetid://13398815770")[1] or LoadCustomInstance("https://raw.githubusercontent.com/persopoiu/scripts/main/SeekGunAssets/SeekPuddle.rbxm")
seekPuddle.Size = Vector3.new(0.001, 0.001, 0.001)
seekGun.Parent = player.Backpack
function playSound(rbxassetid,part)
task.spawn(function()
local sound = Instance.new("Sound",part or game:GetService("ReplicatedStorage"))
sound.SoundId = LoadCustomAsset(rbxassetid)
sound:Play()
sound.Ended:Wait()
sound:Destroy()
end)
end
local function check(room)
local Assets = room:WaitForChild("Assets",2)
if Assets then
for _,obj in ipairs(Assets:GetChildren()) do
if string.match(obj.Name,"Painting") or string.match(obj.Name,"painting") then
for _,instance in ipairs(obj:GetDescendants()) do
if instance:IsA("BasePart") or instance:IsA("Part") or instance:IsA("MeshPart") then
instance.CanTouch = true
end
end
end
end
end
end
local addconnect
addconnect = workspace.CurrentRooms.ChildAdded:Connect(function(room)
check(room)
end)
for i,v in pairs(workspace.CurrentRooms:GetChildren()) do
check(v)
end
task.spawn(function()
repeat task.wait() until seekGun == nil or not (seekGun:IsDescendantOf(player.Character) or seekGun:IsDescendantOf(player.Backpack))
addconnect:Disconnect()
seekAmmo:Destroy()
end)
function playPuddleAnimationOverModel(model)
task.spawn(function()
local seekPuddleClone = seekPuddle:Clone()
seekPuddleClone.Position = model["Left Leg"].Position - Vector3.new(0,0.8,0)
seekPuddleClone.CanCollide = true
seekPuddleClone.Anchored = true
seekPuddleClone.Parent = workspace
tweenService:Create(seekPuddleClone,TweenInfo.new(1.5,Enum.EasingStyle.Sine),{
["Size"] = Vector3.new(10, 0.636, 10)
}):Play()
end)
end
seekGun.Activated:Connect(function()
local seekAmmoClone = seekAmmo:Clone()
local spawnPos = workspace.CurrentCamera.CFrame:ToWorldSpace(CFrame.new(0,0,-3) * CFrame.lookAt(Vector3.new(0, 0, 0), workspace.CurrentCamera.CFrame.LookVector))
local Attachment = Instance.new("Attachment", seekAmmoClone)
local LV = Instance.new("LinearVelocity", Attachment)
LV.MaxForce = math.huge
LV.VectorVelocity = mouse.Hit.LookVector * 0.5 * ((_G.launchForce or 20) * 10)
LV.Attachment0 = Attachment
seekAmmoClone.Parent = workspace
seekAmmoClone.CFrame = spawnPos
playSound("rbxassetid://9119460421")
seekAmmoClone.Touched:Connect(function(hit)
seekAmmoClone:Destroy()
task.spawn(function()
if not (game.Players:GetPlayerFromCharacter(hit.Parent)) and hit.Name ~= "Hidden" then
local model = hit:FindFirstAncestorWhichIsA("Model")
if model ~= nil and not (workspace.CurrentRooms:FindFirstChild(model.Name)) and model ~= workspace then
playSound("rbxassetid://344167846")
for _,instance in ipairs(model:GetDescendants()) do
if instance:IsA("BasePart") or instance:IsA("Part") or instance:IsA("MeshPart") then
instance.Anchored = false
instance.Material = "Foil"
instance.Color = Color3.fromRGB(0,0,0)
end
if instance:IsA("TextLabel") then
instance.TextColor3 = Color3.fromRGB(255,255,255)
end
end
if model.Name == "JeffTheKiller" then
local humanoid = model:FindFirstChildOfClass("Humanoid")
if humanoid.Health ~= 0 then
playPuddleAnimationOverModel(model)
playSound("rbxassetid://1196653896")
end
humanoid.Health = 0
end
end
if hit.Name == "BananaPeel" and hit:IsDescendantOf(workspace) then
playSound("rbxassetid://344167846")
hit.Color = Color3.fromRGB(0,0,0)
hit.Material = "Foil"
local mesh = hit:FindFirstChildOfClass("SpecialMesh")
mesh.TextureId = ""
end
end
end)
end)
end)