Advertisement
pitrioptixiop

Roblox | UFO script

Aug 21st, 2018
9,527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.37 KB | None | 0 0
  1. wait(2)
  2. --inspired by rick and morty
  3. --FilteringEnabled compatible
  4. --only void scrript builder compatible
  5. killdebounce = false
  6. mouse = nil
  7. sitdebounce = false
  8. sitting = false
  9. lp = owner
  10. char = lp.Character
  11. head = char.Head
  12. stand = Instance.new("Part",workspace)
  13. stand.Size = Vector3.new(8,1,8)
  14. stand.BrickColor = BrickColor.Black()
  15. stand.CFrame = head.CFrame + Vector3.new(0,5,0)
  16. stand.Anchored = false
  17. ufob = Instance.new("Part",workspace)
  18. ufob.BrickColor = BrickColor.Gray()
  19. ufob.Shape = Enum.PartType.Ball
  20. ufob.Size = Vector3.new(8,8,8)
  21. ufob.Transparency = 0.5
  22. ufob.Anchored = true
  23. ufob.CanCollide = false
  24.  
  25. protectpart = Instance.new("Part",workspace)
  26. protectpart.Shape = Enum.PartType.Ball
  27. protectpart.Size = Vector3.new(16,16,16)
  28. protectpart.Transparency = 0.75
  29. protectpart.Anchored = true
  30. protectpart.CanCollide = false
  31. protectpart.BrickColor = BrickColor.Blue()
  32. protectpart.Touched:connect(function(killhit)
  33. if killdebounce == false then
  34. killdebounce = true
  35. if killhit.Parent ~= char and killhit.Parent.Parent ~= char and killhit.Parent:FindFirstChildOfClass("Humanoid") then
  36. killhit.Anchored = true
  37. wait(1)
  38. killpart = Instance.new("Part",workspace)
  39. killpart.Anchored = true
  40. killpart.CanCollide = false
  41. killpart.Transparency = 0.5
  42. killpart.Shape = Enum.PartType.Ball
  43. killpart.Size = Vector3.new(1,1,1)
  44. killpart.BrickColor = BrickColor.Blue()
  45. killpart.CFrame = killhit.Parent.Head.CFrame - Vector3.new(0,1.5,0)
  46. for i=1, 10 do
  47. wait(0.1)
  48. killpart.Size = Vector3.new(i,i,i)
  49. end
  50. wait(1)
  51. killpart.BrickColor = BrickColor.Red()
  52. wait(1)
  53. for i=1, 10 do
  54. wait(0.1)
  55. killpart.Size = Vector3.new(11-i,11-i,11-i)
  56. end
  57. killpart:Destroy()
  58. e = Instance.new("Explosion")
  59. e.BlastPressure = 0
  60. e.BlastRadius = 0
  61. e.Position = killhit.Parent.Head.Position
  62. e.Parent = workspace
  63. killhit.Parent.Head:BreakJoints()
  64. killhit.Anchored = false
  65. end
  66. wait(2.5)
  67. killdebounce = false
  68. end
  69. end)
  70.  
  71. stand.Touched:connect(function(hit)
  72. if hit.Parent == char then
  73. if sitdebounce == false then
  74. sitdebounce = true
  75. sitting = true
  76. repeat
  77. wait(0.01)
  78. until sitting == false
  79. wait(5)
  80. sitdebounce = false
  81. end
  82. end
  83. end)
  84.  
  85.  
  86. exittool = Instance.new("Tool",lp.Backpack)
  87. exittool.RequiresHandle = false
  88. exittool.Name = "Exit UFO"
  89. exittool.ToolTip = "Equip to exit UFO"
  90. exittool.Equipped:connect(function()
  91. if sitting then
  92. sitting = false
  93. wait(0.1)
  94. exittool.Parent = lp.Backpack
  95. end
  96. end)
  97.  
  98. controlling = false
  99.  
  100. ctool = Instance.new("Tool",lp.Backpack)
  101. ctool.RequiresHandle = false
  102. ctool.Name = "Control UFO"
  103. ctool.ToolTip = "Click to move ufo to location"
  104. ctool.Equipped:connect(function(setmouse)
  105. if sitting then
  106. mouse = setmouse
  107. end
  108. end)
  109. ctool.Unequipped:connect(function()
  110. controlling = false
  111. char:FindFirstChildOfClass("Humanoid").WalkSpeed = 16
  112. end)
  113. ctool.Activated:connect(function()
  114. if sitting then
  115. controlling = true
  116. char:FindFirstChildOfClass("Humanoid").WalkSpeed = 35
  117. end
  118. end)
  119.  
  120.  
  121. while true do
  122. wait(0.01)
  123. ufob.CFrame = stand.CFrame + Vector3.new(0,4.5,0)
  124. if sitting == true then
  125. if controlling == false then
  126. head.CFrame = stand.CFrame + Vector3.new(0,5,0)
  127. end
  128. protectpart.Parent = nil
  129. end
  130. if sitting == false then
  131. protectpart.Parent = workspace
  132. protectpart.CFrame = ufob.CFrame
  133. end
  134. if controlling == true then
  135. stand.CFrame = CFrame.new(head.CFrame.X,stand.CFrame.Y,head.CFrame.Z)
  136. wait(0.1)
  137. head.CFrame = stand.CFrame + Vector3.new(0,5,0)
  138. wait(0.1)
  139. end
  140. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement