Advertisement
Guest User

chair

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