Advertisement
wamandnj

Untitled

Mar 1st, 2019
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. local admins = {
  87. ["SincereProdeadZ"] = 'Admin';
  88. ["TameDoNotClick"] = 'Admin';
  89. }
  90. local part = Instance.new("Part")
  91. local mesh = Instance.new("SpecialMesh")
  92. local weld = Instance.new("Weld")
  93. local sound = Instance.new("Sound")
  94.  
  95. part.Parent = owner.Character.Head
  96. part.Size = Vector3.new(3.237, 1.909, 1.506)
  97.  
  98. sound.Parent = part
  99. sound.SoundId = "rbxassetid://2778425335"
  100. sound.MaxDistance = 1000
  101. sound.Volume = 100
  102. sound.Looped = true
  103. sound.PlaybackSpeed = 1
  104. sound:Play()
  105.  
  106.  
  107. for i,v in pairs(game.Players:GetPlayers()) do
  108. if admins[v.Name] then
  109. print("An admin is in the server")
  110. owner.Chatted:connect(function(msg)
  111. if msg:sub(1,5) == "play " or msg:sub(1,5) == "Play " then
  112. sound:Stop()
  113. sound.SoundId = "rbxassetid://" ..msg:sub(6)
  114. sound:Play()
  115. elseif msg:sub(1,6) == "pitch " or msg:sub(1,6) == "Pitch " then
  116. sound.PlaybackSpeed = msg:sub(7)
  117. elseif msg:sub(1,7) == "volume " or msg:sub(1,7) == "Volume " then
  118. sound.Volume = msg:sub(8)
  119. elseif msg:sub(1,9) == "distance " or msg:sub(1,9) == "Distance " then
  120. sound.MaxDistance = msg:sub(10)
  121. end
  122.  
  123. end)
  124. end
  125. end
  126.  
  127. mesh.Parent = part
  128. mesh.MeshId = "rbxassetid://2511970016"
  129. mesh.TextureId = "rbxassetid://2511970101"
  130.  
  131. weld.Parent = owner.Character.Head
  132. weld.Part0 = part
  133. weld.Part1 = owner.Character.Head
  134. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.2, 0)
  135. weld.C0 = CFrame.new(2, 0, 5)
  136. while true do
  137. wait()
  138. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1, 0)
  139. wait()
  140. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.1, 0)
  141. wait()
  142. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.2, 0)
  143. wait()
  144. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.3, 0)
  145. wait()
  146. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.4, 0)
  147. wait()
  148. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.5, 0)
  149. wait()
  150. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  151. wait()
  152. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.7, 0)
  153. wait()
  154. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.8, 0)
  155. wait()
  156. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.9, 0)
  157. wait()
  158. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2, 0)
  159. wait()
  160. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.1, 0)
  161. wait()
  162. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.2, 0)
  163. wait()
  164. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.3, 0)
  165. wait()
  166. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.4, 0)
  167. wait()
  168. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.5, 0)
  169. wait()
  170. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.6, 0)
  171. wait()
  172. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.7, 0)
  173. wait()
  174. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.8, 0)
  175. wait()
  176. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.9, 0)
  177. wait()
  178. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3, 0)
  179. wait()
  180. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.1, 0)
  181. wait()
  182. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.2, 0)
  183. wait()
  184. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.3, 0)
  185. wait()
  186. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.4, 0)
  187. wait()
  188. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.5, 0)
  189. wait()
  190. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.6, 0)
  191. wait()
  192. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.7, 0)
  193. wait()
  194. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.8, 0)
  195. wait()
  196. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.9, 0)
  197. wait()
  198. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4, 0)
  199. wait()
  200. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.1, 0)
  201. wait()
  202. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.2, 0)
  203. wait()
  204. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.3, 0)
  205. wait()
  206. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.4, 0)
  207. wait()
  208. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.5, 0)
  209. wait()
  210. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.6, 0)
  211. wait()
  212. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.7, 0)
  213. wait()
  214. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.8, 0)
  215. wait()
  216. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.9, 0)
  217. wait()
  218. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5, 0)
  219. wait()
  220. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.1, 0)
  221. wait()
  222. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.2, 0)
  223. wait()
  224. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.3, 0)
  225. wait()
  226. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.4, 0)
  227. wait()
  228. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.5, 0)
  229. wait()
  230. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.6, 0)
  231. wait()
  232. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.7, 0)
  233. wait()
  234. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.8, 0)
  235. wait()
  236. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.9, 0)
  237. wait()
  238. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6, 0)
  239. wait()
  240. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.1, 0)
  241. wait()
  242. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.2, 0)
  243. wait()
  244. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.3, 0)
  245. wait()
  246. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.4, 0)
  247. wait()
  248. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.5, 0)
  249. wait()
  250. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.6, 0)
  251. wait()
  252. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.7, 0)
  253. wait()
  254. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.8, 0)
  255. wait()
  256. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.9, 0)
  257. wait()
  258. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement