Advertisement
ghostteen14

Untitled

Mar 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.06 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  2.  
  3. -----------------------------------------------------
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Joseph Deramus")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147. Player = game:GetService("Players").LocalPlayer
  148.  
  149. Character = Player.Character
  150.  
  151. PlayerGui = Player.PlayerGui
  152.  
  153. Backpack = Player.Backpack
  154.  
  155. Torso = Character.Torso
  156.  
  157. Head = Character.Head
  158.  
  159. LeftArm = Character["Left Arm"]
  160.  
  161. LeftLeg = Character["Left Leg"]
  162.  
  163. RightArm = Character["Right Arm"]
  164.  
  165. RightLeg = Character["Right Leg"]
  166.  
  167. LS = Torso["Left Shoulder"]
  168.  
  169. LH = Torso["Left Hip"]
  170.  
  171. RS = Torso["Right Shoulder"]
  172.  
  173. RH = Torso["Right Hip"]
  174.  
  175. Tool = Instance.new("HopperBin")
  176.  
  177. Tool.Parent = Backpack
  178.  
  179. Tool.Name = "Painis"
  180.  
  181. Bin = Tool
  182.  
  183. so = function(id, par, vol, pit)
  184.  
  185.  
  186.  
  187. coroutine.resume(coroutine.create(function()
  188.  
  189.  
  190.  
  191. local sou = Instance.new("Sound", par or workspace)
  192.  
  193. sou.Volume = vol
  194.  
  195. sou.Pitch = pit or 1
  196.  
  197. sou.SoundId = id
  198.  
  199. wait()
  200.  
  201. sou:play()
  202.  
  203. wait(6)
  204.  
  205. sou:Remove()
  206.  
  207. end
  208.  
  209. ))
  210.  
  211. end
  212.  
  213.  
  214.  
  215. ob1d = function(mouse)
  216.  
  217.  
  218.  
  219. size = 0.5
  220.  
  221. mode = 1
  222.  
  223. color = BrickColor.new(Color3.new(math.random(), math.random(), math.random()))
  224.  
  225. mo = Instance.new("Model")
  226.  
  227. mo.Name = "EEEEUGH HA HA HAAAAA"
  228.  
  229. mo.Parent = workspace
  230.  
  231. game.Debris:AddItem(mo, 10)
  232.  
  233. p = Instance.new("Seat")
  234.  
  235. p.Name = "Torso"
  236.  
  237. p.Size = Vector3.new(14, 50, 14) * size
  238.  
  239. p.BrickColor = color
  240.  
  241. m = Instance.new("SpecialMesh")
  242.  
  243. m.Parent = p
  244.  
  245. p.Name = "Torso"
  246.  
  247. p.Parent = mo
  248.  
  249. p = Instance.new("Seat")
  250.  
  251. p.Shape = "Ball"
  252.  
  253. p.Size = Vector3.new(24, 24, 24) * size
  254.  
  255. p.BrickColor = color
  256.  
  257. p.Name = "Legball"
  258.  
  259. for i = 1, 10 do
  260.  
  261. lol = Instance.new("Seat")
  262.  
  263. lol.BrickColor = BrickColor:Black()
  264.  
  265. lol.Name = "SEE?"
  266.  
  267. lol.Parent = mo
  268.  
  269. lol.Size = Vector3.new(1, math.random(30, 40), 1) * size
  270.  
  271. w = Instance.new("Weld")
  272.  
  273. w.Part0 = p
  274.  
  275. w.Part1 = lol
  276.  
  277. w.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  278.  
  279. w.Parent = w.Part0
  280.  
  281. end
  282.  
  283. p.Parent = mo
  284.  
  285. w = Instance.new("Weld")
  286.  
  287. w.Part0 = mo.Torso
  288.  
  289. w.Part1 = p
  290.  
  291. w.C0 = CFrame.new(16 * (size / 2), -48 * (size / 2), 0)
  292.  
  293. w.Parent = w.Part0
  294.  
  295. p = Instance.new("Seat")
  296.  
  297. p.Shape = "Ball"
  298.  
  299. p.Size = Vector3.new(24, 24, 24) * size
  300.  
  301. p.BrickColor = color
  302.  
  303. p.Name = "Legball"
  304.  
  305. for i = 1, 10 do
  306.  
  307. lol = Instance.new("Seat")
  308.  
  309. lol.BrickColor = BrickColor:Black()
  310.  
  311. lol.Name = "SEE?"
  312.  
  313. lol.Parent = mo
  314.  
  315. lol.Size = Vector3.new(1, math.random(30, 40), 1) * size
  316.  
  317. w = Instance.new("Weld")
  318.  
  319. w.Part0 = p
  320.  
  321. w.Part1 = lol
  322.  
  323. w.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  324.  
  325. w.Parent = w.Part0
  326.  
  327. end
  328.  
  329. p.Parent = mo
  330.  
  331. w = Instance.new("Weld")
  332.  
  333. w.Part0 = mo.Torso
  334.  
  335. w.Part1 = p
  336.  
  337. w.C0 = CFrame.new(-16 * (size / 2), -48 * (size / 2), 0)
  338.  
  339. w.Parent = w.Part0
  340.  
  341. p = Instance.new("Seat")
  342.  
  343. p.Shape = "Ball"
  344.  
  345. p.Size = Vector3.new(21, 15, 21) * size
  346.  
  347. p.BrickColor = color
  348.  
  349. p.Name = "Legball"
  350.  
  351. for i = 1, 10 do
  352.  
  353. lol = Instance.new("Seat")
  354.  
  355. lol.BrickColor = BrickColor:Black()
  356.  
  357. lol.Name = "SEE?"
  358.  
  359. lol.Parent = mo
  360.  
  361. lol.Size = Vector3.new(1, math.random(30, 40), 1) * size
  362.  
  363. w = Instance.new("Weld")
  364.  
  365. w.Part0 = p
  366.  
  367. w.Part1 = lol
  368.  
  369. w.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  370.  
  371. w.Parent = w.Part0
  372.  
  373. end
  374.  
  375. p.Parent = mo
  376.  
  377. w = Instance.new("Weld")
  378.  
  379. w.Part0 = mo.Torso
  380.  
  381. w.Part1 = p
  382.  
  383. w.C0 = CFrame.new(0, 60 * (size / 2), 0)
  384.  
  385. m = Instance.new("SpecialMesh")
  386.  
  387. m.Parent = p
  388.  
  389. p.Name = "Head"
  390.  
  391. w.Parent = w.Part0
  392.  
  393. s = Instance.new("Sound")
  394.  
  395. s.Parent = mo.Torso
  396.  
  397. s.Volume = 100
  398.  
  399. s.Pitch = 1
  400.  
  401. s.SoundId = "http://www.roblox.com/asset/?id=149779810"
  402.  
  403. s.Looped = true
  404.  
  405. s:play()
  406.  
  407. coroutine.resume(coroutine.create(function(Part)
  408.  
  409.  
  410.  
  411. while Part.Parent ~= nil do
  412.  
  413. wait(math.random())
  414.  
  415. so("http://www.roblox.com/asset/?id=148636758", Part, 100, 1)
  416.  
  417. end
  418.  
  419. end
  420.  
  421. ), mo.Torso)
  422.  
  423. mo.Torso.CFrame = mo.Torso.CFrame * Torso.CFrame * CFrame.new(0, 0, -50 * size) * CFrame.fromEulerAnglesXYZ(-1.57, 0, 0)
  424.  
  425. mo.Torso.Velocity = mouse.Hit.lookVector * 400
  426.  
  427. coroutine.resume(coroutine.create(function(Part)
  428.  
  429.  
  430.  
  431. while 1 do
  432.  
  433. wait(math.random(0, 1) + math.random())
  434.  
  435. Part.RotVelocity = Vector3.new(math.random(-40, 40), math.random(-40, 40), math.random(-40, 40))
  436.  
  437. end
  438.  
  439. end
  440.  
  441. ), mo.Torso)
  442.  
  443. end
  444.  
  445.  
  446.  
  447. ob1u = function(mouse)
  448.  
  449.  
  450.  
  451. end
  452.  
  453.  
  454.  
  455. buttonhold = false
  456.  
  457. key = function(key, mouse)
  458.  
  459.  
  460.  
  461. end
  462.  
  463.  
  464.  
  465. key2 = function(key, mouse)
  466.  
  467.  
  468.  
  469. end
  470.  
  471.  
  472.  
  473. s = function(mouse)
  474.  
  475.  
  476.  
  477. mouse.Button1Down:connect(function()
  478.  
  479.  
  480.  
  481. ob1d(mouse)
  482.  
  483. end
  484.  
  485. )
  486.  
  487. mouse.Button1Up:connect(function()
  488.  
  489.  
  490.  
  491. ob1u(mouse)
  492.  
  493. end
  494.  
  495. )
  496.  
  497. mouse.KeyDown:connect(key)
  498.  
  499. mouse.KeyUp:connect(key2)
  500.  
  501. end
  502.  
  503.  
  504.  
  505. ds = function(mouse)
  506.  
  507.  
  508.  
  509. end
  510.  
  511.  
  512.  
  513. Bin.Selected:connect(s)
  514.  
  515. Bin.Deselected:connect(ds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement