Advertisement
TheUnknownDiscord

dron

Feb 18th, 2022 (edited)
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.93 KB | None | 0 0
  1. print("s")
  2. ds = Instance.new("Part",script)
  3. ds.Anchored = true
  4. ds.Size = Vector3.new(0.05,0.05,0.05)
  5. ds.Material = "SmoothPlastic"
  6. ds.Shape = "Ball"
  7. cutl = Instance.new("Part",script)
  8. cutl.Size = Vector3.new(0.0125,0.065,0.065)
  9. cutl.Anchored = true
  10. cutl.Shape = "Cylinder"
  11. local dr = ds:SubtractAsync({cutl})
  12. dr.Parent = script
  13. dr.Anchored = false
  14. task.wait()
  15. cutl:Destroy()
  16. ds:Destroy()
  17. local bf2 = Instance.new("BodyVelocity", dr)
  18. bf2.MaxForce = Vector3.new(math.huge,10000,math.huge)
  19. bf2.Velocity = Vector3.new()
  20. local object = Instance.new("ObjectValue", owner.PlayerGui)
  21. object.Value = dr
  22. object.Name = "droneb"
  23. task.wait()
  24. local tweenService = game:GetService("TweenService")
  25. local object = dr
  26. local tweenInfo = TweenInfo.new(0.5,Enum.EasingStyle.Back,Enum.EasingDirection.Out,0,false,0)
  27. local goal = {}
  28. goal.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,3,5)
  29. local drs2 = tweenService:Create(object, tweenInfo, goal)
  30. drs2:Play()
  31. coroutine.wrap(function()
  32. wait(0.75)
  33. bf2.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  34. end)()
  35. p = Instance.new("Part",dr)
  36. p.Material = "SmoothPlastic"
  37. p.Size = Vector3.new(0.05,0.05,0.05)
  38. p.Name = "spinner"
  39. p.Color = Color3.fromRGB(75,75,75)
  40. p2 = Instance.new("Part",dr)
  41. p2.Material = "SmoothPlastic"
  42. p2.Color = Color3.fromRGB(25,25,25)
  43. p2.Reflectance = 0.0625
  44. p2.Size = Vector3.new(0.05,0.05,0.05)
  45. p4 = Instance.new("Part",dr)
  46. p4.Material = "Neon"
  47. p4.Color = Color3.fromRGB(0, 198, 224)
  48. p4.Size = Vector3.new(0.05,0.05,0.05)
  49. p5 = Instance.new("Part",dr)
  50. p5.Material = "Neon"
  51. p5.Color = Color3.fromRGB(0, 198, 224)
  52. p5.Size = Vector3.new(0.05,0.05,0.05)
  53. p3 = Instance.new("Part",dr)
  54. p3.Material = "SmoothPlastic"
  55. p3.Color = Color3.fromRGB(25,25,25)
  56. p3.Reflectance = 0.0625
  57. p3.Size = Vector3.new(0.05,0.05,0.05)
  58. local weld = Instance.new("Weld",dr)
  59. weld.Part0 = p
  60. weld.Part1 = dr
  61. local weld2 = Instance.new("Weld",p)
  62. weld2.Part0 = p2
  63. weld2.Part1 = p
  64. weld2.C0 = CFrame.new(0,-0.35,0)
  65. local weld3 = Instance.new("Weld",p)
  66. weld3.Part0 = p3
  67. weld3.Part1 = p
  68. weld3.C0 = CFrame.new(0,-0.35,0)
  69. dr.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,1,-1)
  70. local tweenService = game:GetService("TweenService")
  71. local object = dr
  72. local tweenInfo = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)
  73. local goal = {}
  74. goal.Size = Vector3.new(0.65,0.65,0.65)
  75. local drs = tweenService:Create(object, tweenInfo, goal)
  76. drs:Play()
  77. innercut = Instance.new("Part",dr)
  78. innercut.Size = Vector3.new(0.0125,0.045,0.045)
  79. innercut.Color = Color3.fromRGB(75,75,75)
  80. innercut.Shape = "Cylinder"
  81. local weld4 = Instance.new("Weld",dr)
  82. weld4.Part0 = innercut
  83. weld4.Part1 = dr
  84. innercut2 = Instance.new("Part",dr)
  85. innercut2.Size = Vector3.new(0.00625,0.0475,0.0475)
  86. innercut2.Color = Color3.fromRGB(75,75,75)
  87. innercut2.Shape = "Cylinder"
  88. innercut3 = Instance.new("Part",dr)
  89. innercut3.Size = Vector3.new(0.000625,0.0475,0.0475)
  90. innercut3.Color = Color3.fromRGB(0, 198, 224)
  91. innercut3.Shape = "Cylinder"
  92. innercut3.Material = "Neon"
  93. innercut4 = Instance.new("Part",dr)
  94. innercut4.Size = Vector3.new(0.000625,0.0475,0.0475)
  95. innercut4.Color = Color3.fromRGB(0, 198, 224)
  96. innercut4.Shape = "Cylinder"
  97. innercut4.Material = "Neon"
  98. innercut2.Reflectance = 0.075
  99. local weld5 = Instance.new("Weld",innercut)
  100. weld5.Part0 = innercut2
  101. weld5.Part1 = innercut
  102. local weld6 = Instance.new("Weld",innercut)
  103. weld6.Part0 = innercut3
  104. weld6.Part1 = innercut
  105. local weld7 = Instance.new("Weld",innercut)
  106. weld7.Part0 = innercut4
  107. weld7.Part1 = innercut
  108. local weld8 = Instance.new("Weld",p3)
  109. weld8.Part0 = p4
  110. weld8.Part1 = p3
  111. local weld9 = Instance.new("Weld",p2)
  112. weld9.Part0 = p5
  113. weld9.Part1 = p2
  114. local goal3 = {}
  115. goal3.Size = Vector3.new(0.1625,0.585,0.585)
  116. local drs3 = tweenService:Create(innercut, tweenInfo, goal3)
  117. drs3:Play()
  118. local goal4 = {}
  119. goal4.Size = Vector3.new(0.08125,0.6175,0.6175)
  120. local drs4 = tweenService:Create(innercut2, tweenInfo, goal4)
  121. local goal5 = {}
  122. goal5.Size = Vector3.new(0.008125,0.6225,0.6225)
  123. local drs5 = tweenService:Create(innercut3, tweenInfo, goal5)
  124. local goal6 = {}
  125. goal6.C0 = CFrame.new(0.015,0,0)
  126. local drs6 = tweenService:Create(weld6, tweenInfo, goal6)
  127. local goal7 = {}
  128. goal7.Size = Vector3.new(0.008125,0.6225,0.6225)
  129. local drs7 = tweenService:Create(innercut4, tweenInfo, goal7)
  130. local goal8 = {}
  131. goal8.C0 = CFrame.new(-0.015,0,0)
  132. local drs8 = tweenService:Create(weld7, tweenInfo, goal8)
  133. local goal9 = {}
  134. goal9.Size = Vector3.new(0.775,0.065,0.00625)
  135. local drs9 = tweenService:Create(p4, tweenInfo, goal9)
  136. local goal10 = {}
  137. goal10.Size = Vector3.new(0.775,0.065,0.00625)
  138. local drs10 = tweenService:Create(p5, tweenInfo, goal10)
  139. drs4:Play()
  140. drs7:Play()
  141. drs8:Play()
  142. drs5:Play()
  143. drs6:Play()
  144. drs9:Play()
  145. drs10:Play()
  146. task.wait()
  147. local tweenService = game:GetService("TweenService")
  148. local object = p
  149. local tweenInfo = TweenInfo.new(0.5,Enum.EasingStyle.Elastic,Enum.EasingDirection.InOut,0,false,0)
  150. local goal = {}
  151. goal.Size = Vector3.new(0.125,0.75,0.125)
  152. local tween = tweenService:Create(object, tweenInfo, goal)
  153. local goal2 = {}
  154. goal2.C0 = CFrame.new(0,-0.5,0)
  155. local tween2 = tweenService:Create(weld, tweenInfo, goal2)
  156. tween:Play()
  157. tween2:Play()
  158. task.wait()
  159. local goal3 = {}
  160. goal3.Size = Vector3.new(0.75,0.0625,0.15)
  161. local tween3 = tweenService:Create(p2, tweenInfo, goal3)
  162. local goal4 = {}
  163. goal4.C0 = CFrame.new(-0.5,-0.35,0) * CFrame.Angles(math.rad(-15),0,0)
  164. goal4.C1 = CFrame.new(0,0,-0.0625)
  165. local tween4 = tweenService:Create(weld2, tweenInfo, goal4)
  166. local goal5 = {}
  167. goal5.Size = Vector3.new(0.75,0.0625,0.15)
  168. local tween5 = tweenService:Create(p3, tweenInfo, goal5)
  169. local goal6 = {}
  170. goal6.C0 = CFrame.new(0.5,-0.35,0) * CFrame.Angles(math.rad(15),0,0)
  171. goal6.C1 = CFrame.new(0,0,0.0625)
  172. local tween6 = tweenService:Create(weld3, tweenInfo, goal6)
  173. tween3:Play()
  174. tween4:Play()
  175. tween5:Play()
  176. tween6:Play()
  177. tween3.Completed:Wait()
  178. TweenService = game:GetService("TweenService")
  179. spininfo = TweenInfo.new(0.25,Enum.EasingStyle.Quart,Enum.EasingDirection.In)
  180. spininfo2 = TweenInfo.new(0.125,Enum.EasingStyle.Linear)
  181. Spin = TweenService:Create(weld,spininfo,{C0 = weld.C0 * CFrame.Angles(0,math.rad(120),0)})
  182. Spin1 = TweenService:Create(weld,spininfo2,{C0 = weld.C0 * CFrame.Angles(0,math.rad(120),0)})
  183. Spin2 = TweenService:Create(weld,spininfo2,{C0 = weld.C0 * CFrame.Angles(0,math.rad(240),0)})
  184. Spin3 = TweenService:Create(weld,spininfo2,{C0 = weld.C0 * CFrame.Angles(0,math.rad(360),0)})
  185.  
  186. Spin:Play()
  187. Spin.Completed:Connect(function()Spin2:Play() end)
  188. Spin1.Completed:Connect(function()Spin2:Play() end)
  189. Spin2.Completed:Connect(function()Spin3:Play() end)
  190. Spin3.Completed:Connect(function()Spin1:Play() end)
  191. dr:SetNetworkOwner(owner)
  192. NLS([[
  193. up = false
  194. down = false
  195. isdrone = false
  196. mouse = owner:GetMouse()
  197. local dr = owner.PlayerGui.droneb.Value
  198. local bg = Instance.new("BodyGyro",dr)
  199. bg.P = 1000000
  200. bg.MaxTorque = Vector3.new(40000000, 40000000, 40000000)
  201. local r = owner.Character.HumanoidRootPart
  202. game:GetService("RunService").RenderStepped:Connect(function()
  203. pcall(function()
  204. if owner.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0) and not isdrone then
  205. lastcf = CFrame.lookAt(dr.Position,dr.Position + owner.Character.Humanoid.MoveDirection)
  206. dr.CFrame = CFrame.new(r.Position) * CFrame.new(0,4,2) * CFrame.Angles(lastcf:ToEulerAnglesXYZ())* CFrame.Angles(math.rad(-55),0,0)
  207. bg.CFrame = CFrame.Angles(lastcf:ToEulerAnglesXYZ())* CFrame.Angles(math.rad(-55),0,0)
  208. elseif not isdrone and owner.Character.Humanoid.MoveDirection == Vector3.new(0,0,0) then
  209. dr.CFrame = CFrame.new(r.Position) * CFrame.new(0,4,2) * CFrame.Angles(lastcf:ToEulerAnglesXYZ())
  210. bg.CFrame = CFrame.Angles(lastcf:ToEulerAnglesXYZ())
  211. elseif isdrone and owner.Character.Humanoid.MoveDirection == Vector3.new(0,0,0) then
  212. if up then
  213. dr.CFrame = CFrame.new(dr.Position) * CFrame.new(0,0.25,0) * CFrame.Angles(lastcf:ToEulerAnglesXYZ())
  214. elseif down then
  215. dr.CFrame = CFrame.new(dr.Position) * CFrame.new(0,-0.25,0) * CFrame.Angles(lastcf:ToEulerAnglesXYZ())
  216. else
  217. dr.CFrame = CFrame.new(dr.Position) * CFrame.Angles(lastcf:ToEulerAnglesXYZ())
  218. end
  219. bg.CFrame = CFrame.Angles(lastcf:ToEulerAnglesXYZ())
  220. elseif isdrone and owner.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0) then
  221. lastcf = CFrame.lookAt(dr.Position,dr.Position + owner.Character.Humanoid.MoveDirection)
  222. if up then
  223. dr.CFrame = CFrame.new(dr.Position) * CFrame.new(0,0.25,0) * CFrame.new(owner.Character.Humanoid.MoveDirection.X * 0.5,owner.Character.Humanoid.MoveDirection.Y * 0.5,owner.Character.Humanoid.MoveDirection.Z * 0.5)
  224. * CFrame.Angles(lastcf:ToEulerAnglesXYZ())* CFrame.Angles(math.rad(-55),0,0)
  225. elseif down then
  226. dr.CFrame = CFrame.new(dr.Position) * CFrame.new(0,-0.25,0) * CFrame.new(owner.Character.Humanoid.MoveDirection.X * 0.5,owner.Character.Humanoid.MoveDirection.Y * 0.5,owner.Character.Humanoid.MoveDirection.Z * 0.5)
  227. * CFrame.Angles(lastcf:ToEulerAnglesXYZ())* CFrame.Angles(math.rad(-55),0,0)
  228. else
  229. dr.CFrame = CFrame.new(dr.Position) * CFrame.new(owner.Character.Humanoid.MoveDirection.X * 0.5,owner.Character.Humanoid.MoveDirection.Y * 0.5,owner.Character.Humanoid.MoveDirection.Z * 0.5)
  230. * CFrame.Angles(lastcf:ToEulerAnglesXYZ())* CFrame.Angles(math.rad(-55),0,0)
  231. end
  232. bg.CFrame = CFrame.Angles(lastcf:ToEulerAnglesXYZ())* CFrame.Angles(math.rad(-55),0,0)
  233. end
  234. end)
  235. end)
  236. mouse.KeyDown:Connect(function(key)
  237. key = key:lower()
  238. if key == "r" then
  239. if not isdrone then
  240. owner.Character.Humanoid.WalkSpeed = 0
  241. owner.Character.Humanoid.JumpPower = 0
  242. isdrone = true
  243. workspace.CurrentCamera.CameraSubject = dr
  244. elseif isdrone then
  245. owner.Character.Humanoid.JumpPower = 50
  246. owner.Character.Humanoid.WalkSpeed = 16
  247. isdrone = false
  248. workspace.CurrentCamera.CameraSubject = owner.Character
  249. end
  250. elseif key == "q" and isdrone then
  251. up = true
  252. elseif key == "e" and isdrone then
  253. down = true
  254. end
  255. end)
  256. mouse.KeyUp:Connect(function(key)
  257. key = key:lower()
  258. if key == "q" and isdrone then
  259. up = false
  260. elseif key == "e" and isdrone then
  261. down = false
  262. end
  263. end)
  264. ]],owner.PlayerGui)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement