Advertisement
SOCHILDISHHH

Hover Chair

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