Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local debounce = true
- local player = Players.LocalPlayer
- local ReplicateStorage = game:GetService("ReplicatedStorage")
- local GravityCoilEvenent = ReplicateStorage:WaitForChild("GamePassEvents"):WaitForChild("GravityCoilEvent")
- local GravityCoilDestroy = ReplicateStorage:WaitForChild("GamePassEvents"):WaitForChild("GravityCoilDestroy")
- local function GravityCoilCheck(player)
- local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,17603127)
- local Coil = player.Backpack:FindFirstChild("GravityCoil")
- local Coil2 = player.StarterGear:FindFirstChild("GravityCoil")
- if ownsGamepass and not Coil and not Coil2 then
- debounce = false
- --print("Cloning")
- local GravityCoil = game:GetService("ReplicatedStorage").GamepassItems:FindFirstChild("GravityCoil"):Clone()
- local GravityCoil2 = game:GetService("ReplicatedStorage").GamepassItems:FindFirstChild("GravityCoil"):Clone()
- GravityCoil.Parent = player.Backpack
- GravityCoil2.Parent = player.StarterGear
- wait(1.5)
- debounce = true
- return
- end
- if ownsGamepass and player.StarterGear:FindFirstChild("GravityCoil") or player.Backpack:FindFirstChild("GravityCoil") then
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- if humanoid then
- debounce = false
- --print("Destroying")
- humanoid:UnequipTools()
- player.Character.Humanoid:UnequipTools()
- wait(0.1)
- GravityCoilDestroy:FireServer()
- -- player.Backpack:FindFirstChild("GravityCoil"):Destroy()
- -- player.StarterGear:FindFirstChild("GravityCoil"):Destroy()
- wait(1.5)
- debounce = true
- return
- end
- end
- end
- GravityCoilEvenent.OnServerEvent:Connect(GravityCoilCheck)
- local function GravityCoilDestroy2(player)
- local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,17603127)if ownsGamepass and player.StarterGear:FindFirstChild("GravityCoil") or player.Backpack:FindFirstChild("GravityCoil") then
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- if humanoid then
- debounce = false
- --print("Destroying")
- humanoid:UnequipTools()
- player.Character.Humanoid:UnequipTools()
- wait(0.1)
- player.Backpack:FindFirstChild("GravityCoil"):Destroy()
- player.StarterGear:FindFirstChild("GravityCoil"):Destroy()
- debounce = true
- return
- else
- return
- end
- end
- end
- GravityCoilDestroy.OnServerEvent:Connect(GravityCoilDestroy2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement