UnderCoverScripts

Tower Defence Simulator

Nov 13th, 2022
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. repeat wait() until game:IsLoaded()
  2. wait(10)
  3. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  4. if v:IsA("BasePart") then
  5. v.Anchored = false
  6. end
  7. end
  8. if game.PlaceId ~= 5591597781 then return end
  9. getgenv().DefaultCam = 1
  10. repeat wait() until game:IsLoaded()
  11. local RazorTable = {}
  12. for i,v in next,workspace:GetChildren() do
  13. if v:IsA("MeshPart") and v.Name == "PhilipsRazor" and not table.find(RazorTable,v) then
  14. table.insert(RazorTable,v)
  15. end
  16. end
  17. Workspace.ChildAdded:Connect(function(Instance)
  18. wait(.5)
  19. if Instance:IsA("MeshPart") and Instance.Name == "PhilipsRazor" and not table.find(RazorTable,Instance) then
  20. table.insert(RazorTable,Instance)
  21. end
  22. end)
  23. task.spawn(function()
  24. while true do
  25. wait()
  26. for i = 1,#RazorTable do
  27. if RazorTable[i] and RazorTable[i].CFrame.Y < 200 then
  28. game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
  29. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = RazorTable[i].CFrame
  30. elseif not RazorTable[i] then
  31. table.remove(RazorTable,i)
  32. end
  33. end
  34. end
  35. end)
Add Comment
Please, Sign In to add comment