Pou_help

Untitled

Mar 17th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.41 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. -- DECAL SPAM SCRIPT. CHANGE THIS TO THE DECAL ID YOU WANT TO BE SPAMMED.
  87.  
  88. local ID = 1397933622
  89.  
  90. -- IF YOU WANT THE SKYBOX TO BE SPAMMED AS WELL, TURN THIS TO TRUE.
  91.  
  92. local Skybox = true
  93.  
  94. -- FINALLY, IF YOU WANT PARTICLES TO BE SPAMMED, TURN THIS TO TRUE.
  95.  
  96. local particle = false
  97.  
  98. -- DO NOT CHANGE BELOW. UNLESS YOU KNOW WHAT YOU'RE DOING.
  99.  
  100. for i,v in pairs (game.Workspace:GetChildren()) do
  101. if v:IsA("Part") then
  102. local decal1 =Instance.new("Decal")
  103. local decal2 =Instance.new("Decal")
  104. local decal3 =Instance.new("Decal")
  105. local decal4 =Instance.new("Decal")
  106. local decal5 =Instance.new("Decal")
  107. local decal6 =Instance.new("Decal")
  108. decal1.Texture = "http://www.roblox.com/asset/?id=" ..ID
  109. decal2.Texture = "http://www.roblox.com/asset/?id=" ..ID
  110. decal3.Texture = "http://www.roblox.com/asset/?id=" ..ID
  111. decal4.Texture = "http://www.roblox.com/asset/?id=" ..ID
  112. decal5.Texture = "http://www.roblox.com/asset/?id=" ..ID
  113. decal6.Texture = "http://www.roblox.com/asset/?id=" ..ID
  114. decal1.Parent = v
  115. decal2.Parent = v
  116. decal3.Parent = v
  117. decal4.Parent = v
  118. decal5.Parent = v
  119. decal6.Parent = v
  120. decal1.Face = "Front"
  121. decal2.Face = "Top"
  122. decal3.Face = "Left"
  123. decal4.Face = "Right"
  124. decal5.Face = "Bottom"
  125. decal6.Face = "Back"
  126. end
  127. end
  128. for i,v in pairs (game.Workspace:GetChildren()) do
  129. if v:IsA("Model") then
  130. for i,z in pairs (v:GetChildren()) do
  131. if z:IsA("Part") then
  132. local decal7 =Instance.new("Decal")
  133. local decal8 =Instance.new("Decal")
  134. local decal9 =Instance.new("Decal")
  135. local decal10 =Instance.new("Decal")
  136. local decal11 =Instance.new("Decal")
  137. local decal12 =Instance.new("Decal")
  138. decal7.Texture = "http://www.roblox.com/asset/?id=" ..ID
  139. decal8.Texture = "http://www.roblox.com/asset/?id=" ..ID
  140. decal9.Texture = "http://www.roblox.com/asset/?id=" ..ID
  141. decal10.Texture = "http://www.roblox.com/asset/?id=" ..ID
  142. decal11.Texture = "http://www.roblox.com/asset/?id=" ..ID
  143. decal12.Texture = "http://www.roblox.com/asset/?id=" ..ID
  144. decal7.Parent = z
  145. decal8.Parent = z
  146. decal9.Parent = z
  147. decal10.Parent = z
  148. decal11.Parent = z
  149. decal12.Parent = z
  150. decal7.Face = "Front"
  151. decal8.Face = "Top"
  152. decal9.Face = "Left"
  153. decal10.Face = "Right"
  154. decal11.Face = "Bottom"
  155. decal12.Face = "Back"
  156. end
  157. end
  158. end
  159. end
  160.  
  161.  
  162. if Skybox == true then
  163. local sky = Instance.new("Sky")
  164. sky.Parent = game.Lighting
  165. sky.SkyboxBk = "http://www.roblox.com/asset/?id=" ..ID
  166. sky.SkyboxDn = "http://www.roblox.com/asset/?id=" ..ID
  167. sky.SkyboxFt = "http://www.roblox.com/asset/?id=" ..ID
  168. sky.SkyboxLf = "http://www.roblox.com/asset/?id=" ..ID
  169. sky.SkyboxRt = "http://www.roblox.com/asset/?id=" ..ID
  170. sky.SkyboxUp = "http://www.roblox.com/asset/?id=" ..ID
  171. end
  172.  
  173. if particle == true then
  174. for i,v in pairs (game.Workspace:GetChildren()) do
  175. if v:IsA("Part") then
  176. local particle = Instance.new("ParticleEmitter")
  177. particle.Texture = "http://www.roblox.com/asset/?id=" ..ID
  178. particle.Parent = v
  179. particle.Rate = 200
  180. for i,x in pairs (game.Workspace:GetChildren()) do
  181. if x:IsA("Model") then
  182. for i,z in pairs (x:GetChildren()) do
  183. if z:IsA("Part") then
  184. local particle2 = Instance.new("ParticleEmitter")
  185. particle2.Texture = "http://www.roblox.com/asset/?id=" ..ID
  186. particle2.Parent = z
  187. particle2.Rate = 200
  188. end
  189. end
  190. end
  191. end
  192. end
  193. end
  194. end
Advertisement
Add Comment
Please, Sign In to add comment