Advertisement
samuelrichter66

hover chair

May 30th, 2019
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.46 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153.  
  154. if script.ClassName~="LocalScript" then wait(math.huge) end
  155. peron = game.Players["samuelrichter66"]
  156. Player=peron
  157. player=peron
  158. person=peron
  159. Person=peron
  160. script.Parent=peron
  161. FF=false
  162. FF2=Instance.new("ForceField")
  163. if peron.Backpack:findFirstChild("Chair") == nil then
  164. local h = Instance.new("HopperBin")
  165. h.Name = "Chair" h.Parent = peron.Backpack
  166. script.Parent = h
  167. p = Instance.new("IntValue")
  168. p.Name = "Damage" p.Parent = h
  169. p.Value = 75
  170. wait(math.huge)
  171. end
  172. range = 50
  173. speed = 15
  174. function chair()
  175. local h = Instance.new("HopperBin")
  176. FIRE=false
  177. h.Name = "Chair" h.Parent = peron.Backpack
  178. p = Instance.new("IntValue")
  179. p.Name = "Damage" p.Parent = h
  180. p.Value = 100
  181. wait(1)
  182. local bin = peron.Backpack.Chair
  183. me1 = peron me = peron.Character
  184. distance = 3/2
  185. follow = false
  186. damage = bin.Damage
  187. p = Instance.new("IntValue")
  188. p.Name = "Safe" p.Parent = me
  189. if me:findFirstChild("part1") == nil then
  190. local part1 = Instance.new("Seat")
  191. part1.BrickColor = BrickColor.new("Black")
  192. 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"
  193. local mesh = Instance.new("SpecialMesh") mesh.Parent = part1 part1.Reflectance=math.huge mesh.Scale = Vector3.new(2,1.75,2) mesh.MeshType = "Sphere"
  194. bp = Instance.new("BodyPosition") bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  195. bp.Parent = part1
  196. bp.position=peron.Character.Torso.Position
  197. part1.CFrame=peron.Character.Torso.CFrame
  198. local bg = Instance.new("BodyGyro") bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge) bg.Parent = part1
  199. main = part1:Clone()
  200. 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"
  201. local mesh = Instance.new("BlockMesh") mesh.Parent = part2 mesh.Scale = Vector3.new(3,0.75,3)
  202. 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"
  203. local mesh = Instance.new("CylinderMesh") mesh.Parent = part3 mesh.Scale = Vector3.new(2.5,0.5,2.5)
  204. 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"
  205. local mesh = Instance.new("BlockMesh") mesh.Parent = part4 mesh.Scale = Vector3.new(3,3,0.5)
  206. 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"
  207. local mesh = Instance.new("CylinderMesh") mesh.Parent = part5 mesh.Scale = Vector3.new(1.5,0.5,1.5)
  208. 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"
  209. local mesh1 = Instance.new("SpecialMesh") mesh1.Parent = part6 part6.Reflectance=math.huge mesh1.Scale = Vector3.new(1,1,1) mesh1.MeshType = "Sphere"
  210. 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"
  211. local mesh = Instance.new("BlockMesh") mesh.Parent = part7 mesh.Scale = Vector3.new(1,0.25,1)
  212. 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"
  213. local mesh = Instance.new("BlockMesh") mesh.Parent = part8 mesh.Scale = Vector3.new(1,0.25,1)
  214. 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"
  215. local mesh = Instance.new("BlockMesh") mesh.Parent = part9 mesh.Scale = Vector3.new(1,0.25,3)
  216. 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"
  217. local mesh = Instance.new("BlockMesh") mesh.Parent = part10 mesh.Scale = Vector3.new(1,0.25,3)
  218. 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"
  219. local mesh = Instance.new("BlockMesh") mesh.Parent = part11 mesh.Scale = Vector3.new(0.2,0.2,0.5)
  220. 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"
  221. 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
  222.  
  223. 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)
  224. 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)
  225. 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)
  226. 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)
  227. 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)
  228. 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)
  229. 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)
  230.  
  231. 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)
  232. 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)
  233.  
  234. 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)
  235. 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)
  236. end
  237. beam=Instance.new("Part")
  238. beam1=Instance.new("Part")
  239. function wire(pos1,pos2,ref)
  240. local P = beam
  241. local P2 = pos1
  242. local P1 = pos2
  243. P.Parent=peron
  244. P.Name = "Beam"
  245. local Place0 = CFrame.new(P2.x,P2.y,P2.z)
  246. P.formFactor = 0
  247. P.Size = Vector3.new(1,1,(P1 - P2).magnitude)
  248. P.Size=Vector3.new(0.1,0.1,0.1)
  249. P.CFrame = CFrame.new((P1 + P2)/2,Place0.p)
  250. P.Parent = player.Character
  251. P.BrickColor = BrickColor.new("Bright blue")
  252. P.Transparency = 0.5
  253. P.Reflectance = ref
  254. P.Anchored = true
  255. P.CanCollide = false
  256. P.TopSurface = "Smooth"
  257. P.BottomSurface = "Smooth"
  258. local m = Instance.new("SpecialMesh")
  259. m.Parent = P
  260. m.MeshType = "Brick"
  261. m.Scale = Vector3.new(.1,.1,(P1 - P2).magnitude)
  262. return P
  263. end
  264. function wire2(pos1,pos2,ref)
  265. local P = beam1
  266. local P2 = pos1
  267. local P1 = pos2
  268. P.Name = "Beam"
  269. local Place0 = CFrame.new(P2.x,P2.y,P2.z)
  270. P.formFactor = 0
  271. P.Parent=peron
  272. --P.Size = Vector3.new(1,1,(P1 - P2).magnitude)
  273. P.Size=Vector3.new(0.1,0.1,0.1)
  274. P.CFrame = CFrame.new((P1 + P2)/2,Place0.p)
  275. P.Parent = player.Character
  276. P.BrickColor = BrickColor.new("Bright blue")
  277. P.Transparency = 0.5
  278. P.Reflectance = ref
  279. P.Anchored = true
  280. P.CanCollide = false
  281. P.TopSurface = "Smooth"
  282. P.BottomSurface = "Smooth"
  283. local m = Instance.new("SpecialMesh")
  284. m.Parent = P
  285. m.MeshType = "Brick"
  286. m.Scale = Vector3.new(.1,.1,(P1 - P2).magnitude)
  287. return P
  288. end
  289. function Balefire(pos, obj)
  290. hum = obj.Parent:findFirstChild("Humanoid")
  291. if hum ~= nil then
  292. local P = Instance.new("Part")
  293. P.Name = "Laser"
  294. local Place0 = me.part12.CFrame
  295. P.formFactor = 0
  296. P.Parent = game.Workspace
  297. P.Color = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1))
  298. P.Transparency = 0.25 P.Reflectance = 0.25 P.Anchored = true P.formFactor = "Plate" P.CanCollide = false
  299. pl = Instance.new("BlockMesh")
  300. pl.Scale = Vector3.new(0.1,0.2,1)
  301. pl.Parent = P
  302. P.Size = Vector3.new(1,0.4,(Place0.p - pos).magnitude)
  303. P.CFrame = CFrame.new((Place0.p + pos)/2, Place0.p)
  304. if hum.Health <= 100 then
  305. hum.Health = hum.Health - damage.Value else hum.Health = 0 end wait(0.01) P:Remove() end
  306. end
  307. function Balefire1(pos, obj)
  308. hum = obj.Parent:findFirstChild("Humanoid")
  309. if hum ~= nil then
  310. local P = Instance.new("Part") P.Name = "Laser"
  311. local Place0 = me.part11.CFrame P.formFactor = 0 P.Parent = game.Workspace
  312. P.Color = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1))
  313. P.Transparency = 0.25 P.Reflectance = 0.25 P.Anchored = true P.formFactor = "Plate" P.CanCollide = false
  314. pl = Instance.new("BlockMesh") pl.Scale = Vector3.new(0.1,0.2,1) pl.Parent = P
  315. P.Size = Vector3.new(1,0.4,(Place0.p - pos).magnitude) P.CFrame = CFrame.new((Place0.p + pos)/2, Place0.p)
  316. if hum.Health <= 100 then hum.Health = hum.Health - damage.Value else hum.Health = 0 end wait(0.01) P:Remove() end
  317. end
  318. function findNearestTorso(pos)
  319. local list = game.Workspace:getChildren()
  320. local torso = nil
  321. local dist = range
  322. local temp = nil
  323. local human = nil
  324. local temp2 = nil
  325. for x = 1, #list do
  326. temp2 = list[x]
  327. local safe = temp2:findFirstChild("Safe")
  328. if (temp2.className == "Model") and (safe == nil) and damage.Value > 0 then
  329. temp = temp2:findFirstChild("Torso") human = temp2:findFirstChild("Humanoid")
  330. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  331. if (temp.Position - pos).magnitude < dist then
  332. torso = temp dist = (temp.Position - pos).magnitude
  333. end
  334. end
  335. end
  336. if (temp2.className == "Model") and damage.Value <= 0 then
  337. temp = temp2:findFirstChild("Torso")
  338. human = temp2:findFirstChild("Humanoid")
  339. if (temp ~= nil) and (human ~= nil) and (human.Health < 100) then
  340. if (temp.Position - pos).magnitude < dist then
  341. torso = temp
  342. dist = (temp.Position - pos).magnitude
  343. end
  344. end
  345. end
  346. end
  347. return torso
  348. end
  349. function onButton1Down(mouse)
  350. local player = peron
  351. main = me.part1
  352. main.Anchored = false
  353. me1 = peron
  354. follow = true
  355. while follow == true do
  356. distance = 3/2 mousehit = mouse.Hit.p if (main.BodyPosition.position - mousehit).magnitude >speed then
  357. main_mousehit = (main.BodyPosition.position - mousehit).unit*speed
  358. else
  359. main_mousehit = (main.BodyPosition.position - mousehit).unit*1
  360. end
  361. start1 = main.BodyPosition.position-main_mousehit
  362. main.BodyPosition.position = Vector3.new(start1.x, start1.y, start1.z)
  363. local dir = (mousehit - main.Position).unit
  364. local spawnPos = main.Position
  365. local pos = spawnPos + (dir * 1)
  366. local dir = (pos - main.Position)
  367. local Angle = ((mouse.ViewSizeX/2)-mouse.X)/100
  368. if math.abs(Angle) > 1 then if Angle > 0 then Angle = Angle - 1 else Angle = Angle + 1 end
  369.  
  370. 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
  371. wait() end end
  372. function onButton1Up(mouse)
  373. main = me.part1
  374. main.Anchored = false
  375. follow = false
  376. end
  377. local msg = Instance.new("Hint")
  378. function say(tehmessage)
  379. msg.Parent = me1
  380. msg.Text = tehmessage
  381. wait(2)
  382. msg.Parent = nil
  383. end
  384.  
  385. function onKeyUp(key,mouse)
  386. if (key=="e") then FIRE=false end
  387. end
  388.  
  389. function onKeyDown(key,mouse)
  390. if (key~=nil) then
  391. if (key=="f") then speed = speed+1 say("speed: "..speed)
  392. elseif (key=="c") then
  393. speed = speed-1 say("speed: "..speed)
  394. elseif (key=="g") then
  395. range = range+1 say("range: "..range)
  396. elseif (key=="x") then
  397. FF3=Instance.new("ForceField",peron.Character)
  398. main.Anchored=true
  399. X=Instance.new("Explosion")
  400. X.Parent=workspace
  401. X.BlastPressure=math.huge
  402. X.BlastRadius=10
  403. X.Position=peron.Character.Torso.Position
  404. while X.Parent do wait() end
  405. wait()
  406. FF3:remove()
  407. main.Anchored=false
  408. elseif (key=="v") then
  409. if range == 0 then return end
  410. range = range-1 say("range: "..range)
  411. elseif (key=="h") then
  412. damage.Value = damage.Value+1 say("damage: "..damage.Value)
  413. elseif (key=="m") then
  414. main.CFrame=peron.Character.Torso.CFrame
  415. main.BodyPosition.position=peron.Character.Torso.Position
  416. elseif (key=="n") then
  417. FF=not FF
  418. if FF then FF2.Parent=peron.Character else FF2.Parent=nil end
  419. elseif (key=="b") then
  420. damage.Value = damage.Value-1 say("damage: "..damage.Value)
  421. elseif (key=="r") then
  422. speed = 2 range = 0 damage.Value = 0 say("speed: "..speed) say("damage: "..damage.Value) say("range: "..range)
  423. elseif (key=="e") then
  424. FIRE=true
  425. while FIRE do
  426. wire(part11.Position,mouse.Hit.p,math.huge)
  427. wire2(part12.Position,mouse.Hit.p,math.huge)
  428. if mouse.Target then
  429. mouse.Target:breakJoints()
  430. if mouse.Target:getMass()<1000 then mouse.Target.Anchored=false end
  431. end
  432. wait()
  433. end
  434. beam.Parent=nil
  435. beam1.Parent=nil
  436. elseif (key=="q") then
  437. local target = findNearestTorso(me.Torso.Position)
  438. if target ~= nil then
  439. baned = game.Players:children()
  440. for x = 1, #baned do
  441. if baned[x].Name == peron.Name then
  442. head = target.Parent:findFirstChild("Humanoid")
  443. if head.Health ~= 0 then
  444. tag = Instance.new("ObjectValue") tag.Value = baned[x] tag.Name = "creator" tag.Parent = head
  445. Balefire(target.Position, target) Balefire1(target.Position, target)
  446. end
  447. end
  448. end
  449. end
  450. end
  451. end
  452. end
  453. function onSelected(mouse)
  454. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  455. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  456. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  457. mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
  458. mouse.KeyUp:connect(function(key) onKeyUp(key,mouse) end)
  459. end
  460. bin.Selected:connect(onSelected) -- LEGO
  461. end
  462. peron.CharacterAdded:connect(function() wait() chair() end)
  463. chair()
  464. local HINT=Instance.new("ScreenGui",peron.PlayerGui)
  465. local Text=Instance.new("Frame",HINT)
  466. Instance.new("ForceField",peron.Character)
  467. Text.Position=UDim2.new(0.290000057, 0, 0.00999999978, 0)
  468. Text.Size=UDim2.new(0.45, 0, 0.0399999991, 0)
  469. Text.Style="RobloxRound"
  470. Text.BackgroundTransparency=0.5
  471. local INNER=Instance.new("TextLabel")
  472. INNER.Parent=Text
  473. INNER.Position=UDim2.new(0.5,0,0.5,0)
  474. INNER.TextColor3=Color3.new(1,1,1)
  475. while wait() do
  476. INNER.Text="HoverChair OS | F Speed: "..speed.." C | To Fire YAR LAZERS, press Q. | N for FF, M to call "
  477. Text.Parent=HINT
  478. INNER.Parent=Text
  479. HINT.Parent=peron.PlayerGui
  480. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement