Advertisement
GForcebit

Hover Chair

Apr 19th, 2018
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.21 KB | None | 0 0
  1.  
  2. --Edited by: GForcebit
  3. --Original creator: SOCHILDISHHH
  4. --Orignal Paste:https://pastebin.com/BY5fdUX5
  5. if script.ClassName~="LocalScript" then wait(math.huge) end
  6. --[[ solve it]]
  7. local peron = game.Players.LocalPlayer
  8. Player=peron
  9. player=peron
  10. person=peron
  11. Person=peron
  12. script.Parent=peron
  13. FF=false
  14. FF2=Instance.new("ForceField")
  15. --if peron.Backpack:findFirstChild("Chair") == nil then
  16. -- local h = Instance.new("HopperBin")
  17. -- h.Name = "Chair" h.Parent = peron.Backpack
  18. -- script.Parent = h
  19. -- p = Instance.new("IntValue")
  20. -- p.Name = "Damage" p.Parent = h
  21. -- p.Value = 75
  22. -- wait(math.huge)
  23. -- end
  24. range = 50
  25. speed = 15
  26. function chair()
  27. local h = Instance.new("HopperBin")
  28. FIRE=false
  29. h.Name = "Chair" h.Parent = peron.Backpack
  30. p = Instance.new("IntValue")
  31. p.Name = "Damage" p.Parent = h
  32. p.Value = 100
  33. wait(1)
  34. local bin = peron.Backpack.Chair
  35. me1 = peron me = peron.Character
  36. distance = 3/2
  37. follow = false
  38. damage = bin.Damage
  39. p = Instance.new("IntValue")
  40. p.Name = "Safe" p.Parent = me
  41. if me:findFirstChild("part1") == nil then
  42. local part1 = Instance.new("Seat")
  43. part1.BrickColor = BrickColor.new("Black")
  44. part1.Transparency = 0 part1.TopSurface = 0 part1.BottomSurface = 0 part1.Reflectance = math.huge part1.Locked = true part1.Size = Vector3.new(1,1,1) part1.Anchored = false part1.Shape = 0 part1.CanCollide = false part1.Name = "part1"
  45. local mesh = Instance.new("SpecialMesh") mesh.Parent = part1 part1.Reflectance=math.huge mesh.Scale = Vector3.new(2,1.75,2) mesh.MeshType = "Sphere"
  46. bp = Instance.new("BodyPosition") bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  47. bp.Parent = part1
  48. bp.position=peron.Character.Torso.Position
  49. part1.CFrame=peron.Character.Torso.CFrame
  50. local bg = Instance.new("BodyGyro") bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge) bg.Parent = part1
  51. main = part1:Clone()
  52. local part2 = Instance.new("Part") part2.BrickColor = BrickColor.new("White") part2.Transparency = 0 part2.TopSurface = 0 part2.BottomSurface = 0 part2.Locked = true part2.Size = Vector3.new(1,1,1) part2.Anchored = false part2.Shape = 0 part2.CanCollide = false part2.Name = "part2"
  53. local mesh = Instance.new("BlockMesh") mesh.Parent = part2 mesh.Scale = Vector3.new(3,0.75,3)
  54. local part3 = Instance.new("Part") part3.BrickColor = BrickColor.new("White") part3.Transparency = 0 part3.TopSurface = 0 part3.BottomSurface = 0 part3.Locked = true part3.Size = Vector3.new(1,0.5,1) part3.Anchored = false part3.Shape = 0 part3.CanCollide = false part3.Name = "part3"
  55. local mesh = Instance.new("CylinderMesh") mesh.Parent = part3 mesh.Scale = Vector3.new(2.5,0.5,2.5)
  56. local part4 = Instance.new("Part") part4.BrickColor = BrickColor.new("White") part4.Transparency = 0 part4.TopSurface = 0 part4.BottomSurface = 0 part4.Locked = true part4.Size = Vector3.new(1,1,1) part4.Anchored = false part4.Shape = 0 part4.CanCollide = false part4.Name = "part4"
  57. local mesh = Instance.new("BlockMesh") mesh.Parent = part4 mesh.Scale = Vector3.new(3,3,0.5)
  58. local part5 = Instance.new("Part") part5.BrickColor = BrickColor.new("White") part5.Transparency = 0 part5.TopSurface = 0 part5.BottomSurface = 0 part5.Locked = true part5.Size = Vector3.new(1,0.5,1) part5.Anchored = false part5.Shape = 0 part5.CanCollide = false part5.Name = "part5"
  59. local mesh = Instance.new("CylinderMesh") mesh.Parent = part5 mesh.Scale = Vector3.new(1.5,0.5,1.5)
  60. local part6 = Instance.new("Part") part6.BrickColor = BrickColor.new("Black") part6.Transparency = 0 part6.TopSurface = 0 part6.BottomSurface = 0 part6.Locked = true part6.Size = Vector3.new(1,1,1) part6.Anchored = false part6.Shape = 0 part6.CanCollide = false part6.Name = "part6"
  61. local mesh1 = Instance.new("SpecialMesh") mesh1.Parent = part6 part6.Reflectance=math.huge mesh1.Scale = Vector3.new(1,1,1) mesh1.MeshType = "Sphere"
  62. local part7 = Instance.new("Part") part7.BrickColor = BrickColor.new("White") part7.Transparency = 0 part7.TopSurface = 0 part7.BottomSurface = 0 part7.Locked = true part7.Size = Vector3.new(1,1,1) part7.Anchored = false part7.Shape = 0 part7.CanCollide = false part7.Name = "part7"
  63. local mesh = Instance.new("BlockMesh") mesh.Parent = part7 mesh.Scale = Vector3.new(1,0.25,1)
  64. local part8 = Instance.new("Part") part8.BrickColor = BrickColor.new("White") part8.Transparency = 0 part8.TopSurface = 0 part8.BottomSurface = 0 part8.Locked = true part8.Size = Vector3.new(1,1,1) part8.Anchored = false part8.Shape = 0 part8.CanCollide = false part8.Name = "part8"
  65. local mesh = Instance.new("BlockMesh") mesh.Parent = part8 mesh.Scale = Vector3.new(1,0.25,1)
  66. local part9 = Instance.new("Part") part9.BrickColor = BrickColor.new("White") part9.Transparency = 0 part9.TopSurface = 0 part9.BottomSurface = 0 part9.Locked = true part9.Size = Vector3.new(1,1,1) part9.Anchored = false part9.Shape = 0 part9.CanCollide = false part9.Name = "part9"
  67. local mesh = Instance.new("BlockMesh") mesh.Parent = part9 mesh.Scale = Vector3.new(1,0.25,3)
  68. local part10 = Instance.new("Part") part10.BrickColor = BrickColor.new("White") part10.Transparency = 0 part10.TopSurface = 0 part10.BottomSurface = 0 part10.Locked = true part10.Size = Vector3.new(1,1,1) part10.Anchored = false part10.Shape = 0 part10.CanCollide = false part10.Name = "part10"
  69. local mesh = Instance.new("BlockMesh") mesh.Parent = part10 mesh.Scale = Vector3.new(1,0.25,3)
  70. part11 = Instance.new("Part") part11.BrickColor = BrickColor.new("Black") part11.Transparency = 0 part11.TopSurface = 0 part11.BottomSurface = 0 part11.Locked = true part11.Size = Vector3.new(1,1,1) part11.Anchored = false part11.Shape = 0 part11.CanCollide = false part11.Name = "part11"
  71. local mesh = Instance.new("BlockMesh") mesh.Parent = part11 mesh.Scale = Vector3.new(0.2,0.2,0.5)
  72. part12 = Instance.new("Part") part12.BrickColor = BrickColor.new("Black") part12.Transparency = 0 part12.TopSurface = 0 part12.BottomSurface = 0 part12.Locked = true part12.Size = Vector3.new(1,1,1) part12.Anchored = false part12.Shape = 0 part12.CanCollide = false part12.Name = "part12"
  73. local mesh = Instance.new("BlockMesh") mesh.Parent = part12 mesh.Scale = Vector3.new(0.2,0.2,0.5) main.Parent = me part2.Parent = me part3.Parent = me part4.Parent = me part5.Parent = me part6.Parent = me part7.Parent = me part8.Parent = me part9.Parent = me part10.Parent = me part11.Parent = me part12.Parent = me
  74.  
  75. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part2 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -0.5, 0)
  76. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part3 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0)
  77. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part4 weld.C1 = CFrame.fromEulerAnglesXYZ(-0.1, 0, 0) * CFrame.new(0, -2, -0.75)
  78. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part5 weld.C1 = CFrame.fromEulerAnglesXYZ(-4.815, 0, 0) * CFrame.new(0, -2, -1)
  79. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part6 weld.C1 = CFrame.fromEulerAnglesXYZ(-4.815, 0, 0) * CFrame.new(0, -2, -1.25)
  80. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part7 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(1.75, -0.5, 0)
  81. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part8 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(-1.75, -0.5, 0)
  82.  
  83. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part9 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(-1.5, -1.875, 0)
  84. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part10 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(1.5, -1.875, 0)
  85.  
  86. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part11 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(2, -0.5, 0.75)
  87. local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part12 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(-2, -0.5, 0.75)
  88. end
  89. beam=Instance.new("Part")
  90. beam1=Instance.new("Part")
  91. function wire(pos1,pos2,ref)
  92. local P = beam
  93. local P2 = pos1
  94. local P1 = pos2
  95. P.Parent=peron
  96. P.Name = "Beam"
  97. local Place0 = CFrame.new(P2.x,P2.y,P2.z)
  98. P.formFactor = 0
  99. --P.Size = Vector3.new(1,1,(P1 - P2).magnitude)
  100. P.Size=Vector3.new(0.1,0.1,0.1)
  101. P.CFrame = CFrame.new((P1 + P2)/2,Place0.p)
  102. P.Parent = player.Character
  103. P.BrickColor = BrickColor.new("Bright blue")
  104. P.Transparency = 0.5
  105. P.Reflectance = ref
  106. P.Anchored = true
  107. P.CanCollide = false
  108. P.TopSurface = "Smooth"
  109. P.BottomSurface = "Smooth"
  110. local m = Instance.new("SpecialMesh")
  111. m.Parent = P
  112. m.MeshType = "Brick"
  113. m.Scale = Vector3.new(.1,.1,(P1 - P2).magnitude)
  114. return P
  115. end
  116. function wire2(pos1,pos2,ref)
  117. local P = beam1
  118. local P2 = pos1
  119. local P1 = pos2
  120. P.Name = "Beam"
  121. local Place0 = CFrame.new(P2.x,P2.y,P2.z)
  122. P.formFactor = 0
  123. P.Parent=peron
  124. --P.Size = Vector3.new(1,1,(P1 - P2).magnitude)
  125. P.Size=Vector3.new(0.1,0.1,0.1)
  126. P.CFrame = CFrame.new((P1 + P2)/2,Place0.p)
  127. P.Parent = player.Character
  128. P.BrickColor = BrickColor.new("Bright blue")
  129. P.Transparency = 0.5
  130. P.Reflectance = ref
  131. P.Anchored = true
  132. P.CanCollide = false
  133. P.TopSurface = "Smooth"
  134. P.BottomSurface = "Smooth"
  135. local m = Instance.new("SpecialMesh")
  136. m.Parent = P
  137. m.MeshType = "Brick"
  138. m.Scale = Vector3.new(.1,.1,(P1 - P2).magnitude)
  139. return P
  140. end
  141. function Balefire(pos, obj)
  142. hum = obj.Parent:findFirstChild("Humanoid")
  143. if hum ~= nil then
  144. local P = Instance.new("Part")
  145. P.Name = "Laser"
  146. local Place0 = me.part12.CFrame
  147. P.formFactor = 0
  148. P.Parent = game.Workspace
  149. P.Color = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1))
  150. P.Transparency = 0.25 P.Reflectance = 0.25 P.Anchored = true P.formFactor = "Plate" P.CanCollide = false
  151. pl = Instance.new("BlockMesh")
  152. pl.Scale = Vector3.new(0.1,0.2,1)
  153. pl.Parent = P
  154. P.Size = Vector3.new(1,0.4,(Place0.p - pos).magnitude)
  155. P.CFrame = CFrame.new((Place0.p + pos)/2, Place0.p)
  156. if hum.Health <= 100 then
  157. hum.Health = hum.Health - damage.Value else hum.Health = 0 end wait(0.01) P:Remove() end
  158. end
  159. function Balefire1(pos, obj)
  160. hum = obj.Parent:findFirstChild("Humanoid")
  161. if hum ~= nil then
  162. local P = Instance.new("Part") P.Name = "Laser"
  163. local Place0 = me.part11.CFrame P.formFactor = 0 P.Parent = game.Workspace
  164. P.Color = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1))
  165. P.Transparency = 0.25 P.Reflectance = 0.25 P.Anchored = true P.formFactor = "Plate" P.CanCollide = false
  166. pl = Instance.new("BlockMesh") pl.Scale = Vector3.new(0.1,0.2,1) pl.Parent = P
  167. P.Size = Vector3.new(1,0.4,(Place0.p - pos).magnitude) P.CFrame = CFrame.new((Place0.p + pos)/2, Place0.p)
  168. if hum.Health <= 100 then hum.Health = hum.Health - damage.Value else hum.Health = 0 end wait(0.01) P:Remove() end
  169. end
  170. function findNearestTorso(pos)
  171. local list = game.Workspace:getChildren()
  172. local torso = nil
  173. local dist = range
  174. local temp = nil
  175. local human = nil
  176. local temp2 = nil
  177. for x = 1, #list do
  178. temp2 = list[x]
  179. local safe = temp2:findFirstChild("Safe")
  180. if (temp2.className == "Model") and (safe == nil) and damage.Value > 0 then
  181. temp = temp2:findFirstChild("Torso") human = temp2:findFirstChild("Humanoid")
  182. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  183. if (temp.Position - pos).magnitude < dist then
  184. torso = temp dist = (temp.Position - pos).magnitude
  185. end
  186. end
  187. end
  188. if (temp2.className == "Model") and damage.Value <= 0 then
  189. temp = temp2:findFirstChild("Torso")
  190. human = temp2:findFirstChild("Humanoid")
  191. if (temp ~= nil) and (human ~= nil) and (human.Health < 100) then
  192. if (temp.Position - pos).magnitude < dist then
  193. torso = temp
  194. dist = (temp.Position - pos).magnitude
  195. end
  196. end
  197. end
  198. end
  199. return torso
  200. end
  201. function onButton1Down(mouse)
  202. local player = peron
  203. main = me.part1
  204. main.Anchored = false
  205. me1 = peron
  206. follow = true
  207. while follow == true do
  208. distance = 3/2 mousehit = mouse.Hit.p if (main.BodyPosition.position - mousehit).magnitude >speed then
  209. main_mousehit = (main.BodyPosition.position - mousehit).unit*speed
  210. else
  211. main_mousehit = (main.BodyPosition.position - mousehit).unit*1
  212. end
  213. start1 = main.BodyPosition.position-main_mousehit
  214. main.BodyPosition.position = Vector3.new(start1.x, start1.y, start1.z)
  215. local dir = (mousehit - main.Position).unit
  216. local spawnPos = main.Position
  217. local pos = spawnPos + (dir * 1)
  218. local dir = (pos - main.Position)
  219. local Angle = ((mouse.ViewSizeX/2)-mouse.X)/100
  220. if math.abs(Angle) > 1 then if Angle > 0 then Angle = Angle - 1 else Angle = Angle + 1 end
  221.  
  222. Angle = Angle * math.abs(26) / 70 main.BodyGyro.cframe = CFrame.new(pos, pos + dir) * CFrame.fromEulerAnglesXYZ(0, 0, Angle) else main.BodyGyro.cframe = CFrame.new(pos, pos + dir) end
  223. wait() end end
  224. function onButton1Up(mouse)
  225. main = me.part1
  226. main.Anchored = false
  227. follow = false
  228. end
  229. local msg = Instance.new("Hint")
  230. function say(tehmessage)
  231. msg.Parent = me1
  232. msg.Text = tehmessage
  233. wait(2)
  234. msg.Parent = nil
  235. end
  236.  
  237. function onKeyUp(key,mouse)
  238. if (key=="e") then FIRE=false end
  239. end
  240.  
  241. function onKeyDown(key,mouse)
  242. if (key~=nil) then
  243. if (key=="f") then speed = speed+1 say("speed: "..speed)
  244. elseif (key=="c") then
  245. speed = speed-1 say("speed: "..speed)
  246. elseif (key=="g") then
  247. range = range+1 say("range: "..range)
  248. elseif (key=="x") then
  249. FF3=Instance.new("ForceField",peron.Character)
  250. main.Anchored=true
  251. X=Instance.new("Explosion")
  252. X.Parent=workspace
  253. X.BlastPressure=math.huge
  254. X.BlastRadius=10
  255. X.Position=peron.Character.Torso.Position
  256. while X.Parent do wait() end
  257. wait()
  258. FF3:remove()
  259. main.Anchored=false
  260. elseif (key=="v") then
  261. if range == 0 then return end
  262. range = range-1 say("range: "..range)
  263. elseif (key=="h") then
  264. damage.Value = damage.Value+1 say("damage: "..damage.Value)
  265. elseif (key=="m") then
  266. main.CFrame=peron.Character.Torso.CFrame
  267. main.BodyPosition.position=peron.Character.Torso.Position
  268. elseif (key=="n") then
  269. FF=not FF
  270. if FF then FF2.Parent=peron.Character else FF2.Parent=nil end
  271. elseif (key=="b") then
  272. damage.Value = damage.Value-1 say("damage: "..damage.Value)
  273. elseif (key=="r") then
  274. speed = 2 range = 0 damage.Value = 0 say("speed: "..speed) say("damage: "..damage.Value) say("range: "..range)
  275. elseif (key=="e") then
  276. FIRE=true
  277. while FIRE do
  278. wire(part11.Position,mouse.Hit.p,math.huge)
  279. wire2(part12.Position,mouse.Hit.p,math.huge)
  280. if mouse.Target then
  281. mouse.Target:breakJoints()
  282. if mouse.Target:getMass()<1000 then mouse.Target.Anchored=false end
  283. end
  284. wait()
  285. end
  286. beam.Parent=nil
  287. beam1.Parent=nil
  288. elseif (key=="q") then
  289. local target = findNearestTorso(me.Torso.Position)
  290. if target ~= nil then
  291. baned = game.Players:children()
  292. for x = 1, #baned do
  293. if baned[x].Name == peron.Name then
  294. head = target.Parent:findFirstChild("Humanoid")
  295. if head.Health ~= 0 then
  296. tag = Instance.new("ObjectValue") tag.Value = baned[x] tag.Name = "creator" tag.Parent = head
  297. Balefire(target.Position, target) Balefire1(target.Position, target)
  298. end
  299. end
  300. end
  301. end
  302. end
  303. end
  304. end
  305. function onSelected(mouse)
  306. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  307. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  308. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  309. mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
  310. mouse.KeyUp:connect(function(key) onKeyUp(key,mouse) end)
  311. end
  312. bin.Selected:connect(onSelected) -- LEGO
  313. end
  314. peron.CharacterAdded:connect(function() wait() chair() end)
  315. chair()
  316. local HINT=Instance.new("ScreenGui",peron.PlayerGui)
  317. local Text=Instance.new("Frame",HINT)
  318. --Instance.new("ForceField",peron.Character)
  319. Text.Position=UDim2.new(0.290000057, 0, 0.00999999978, 0)
  320. Text.Size=UDim2.new(0.45, 0, 0.0399999991, 0)
  321. --Text.Style="RobloxRound"
  322. Text.BackgroundTransparency=0.5
  323. local INNER=Instance.new("TextLabel")
  324. INNER.Parent=Text
  325. INNER.Position=UDim2.new(0.5,0,0.5,0)
  326. INNER.TextColor3=Color3.new(1,1,1)
  327. while wait() do
  328. INNER.Text="HoverChair OS | F Speed: "..speed.." C | To Fire YAR LAZERS, press Q. | N for FF, M to call "
  329. Text.Parent=HINT
  330. INNER.Parent=Text
  331. HINT.Parent=peron.PlayerGui
  332. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement