A_GUES

Executor Wormface

Apr 1st, 2023
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. local items = game:GetService("Workspace").Items
  2. local hum = game.Players.LocalPlayer.Character.HumanoidRootPart
  3. local tweenserv = game:GetService('TweenService')
  4. local deletethis = game.Players.LocalPlayer.Character.HumanoidRootPart.StarterWorm.Head:FindFirstChild("FaceCenterAttachment")
  5. local rebirthtext = game:GetService("Players").LocalPlayer.PlayerGui.RebirthGui.Button.ProgressBar.Background.Text
  6. local rebirthevent = game:GetService("ReplicatedStorage").RebirthRequest
  7. getgenv().active = true
  8. local doit = true
  9. local function getGem()
  10. for _, v in ipairs(items:GetChildren()) do
  11. if not v then return end
  12. if not v:FindFirstChild('Part') then return end
  13. if(v.Part.Position.X < 325) then
  14. return v.Part
  15. end
  16. end
  17. end
  18. local function gotoGem()
  19. local gem = getGem()
  20. if not gem then return end
  21. local goal = {}
  22. goal.CFrame = gem.CFrame
  23. local tweenInfo = TweenInfo.new(0.01)
  24. local tween = tweenserv:Create(game.Players.LocalPlayer.Character.HumanoidRootPart, tweenInfo, goal)
  25. tween:Play()
  26. wait(0.1)
  27. if(gem.Parent) then
  28. gem.Parent:Destroy()
  29. end
  30. end
  31.  
  32. local function canRebirth()
  33. local split1 = string.split(rebirthtext.Text, " ")
  34. local split2 = string.split(split1[2], "/")
  35. local returnval = tonumber(split2[1]) >= tonumber(split2[2])
  36. return returnval
  37. end
  38. if(deletethis) then
  39. deletethis:Destroy()
  40. end
  41. if(canRebirth()) then
  42. rebirthevent:InvokeServer()
  43. end
  44. local rebirthconnect = rebirthtext:GetPropertyChangedSignal("Text"):Connect(function()
  45. if(canRebirth()) then
  46. print('rebirthing')
  47. doit = false
  48. rebirthevent:InvokeServer()
  49. wait(3)
  50. if(game.Players.LocalPlayer.Character.HumanoidRootPart.StarterWorm.Head:FindFirstChild("FaceCenterAttachment")) then
  51. game.Players.LocalPlayer.Character.HumanoidRootPart.StarterWorm.Head:FindFirstChild("FaceCenterAttachment"):Destroy()
  52. end
  53. doit = true
  54. end
  55. end)
  56.  
  57. local stopconnect = game.Players.LocalPlayer.Chatted:Connect(function(msg)
  58. if(msg == "/e stop") then
  59. getgenv().active = false
  60. rebirthconnect:Disconnect()
  61. end
  62. end)
  63. while getgenv().active do
  64. if doit then
  65. gotoGem()
  66. end
  67. wait()
  68. end
Add Comment
Please, Sign In to add comment