Advertisement
wamandnj

Untitled

Mar 16th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. do
  6. script.Parent = Player.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent and t.Function then
  32. t.Function(...)
  33. end
  34. end
  35. m.TrigEvent = te
  36. UIS.TrigEvent = te
  37.  
  38. Event.OnServerEvent:Connect(function(plr,io)
  39. if plr~=Player then return end
  40. if io.isMouse then
  41. m.Target = io.Target
  42. m.Hit = io.Hit
  43. else
  44. local b = io.UserInputState == Enum.UserInputState.Begin
  45. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  46. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  47. end
  48. for _,t in pairs(CAS.Actions) do
  49. for _,k in pairs(t.Keys) do
  50. if k==io.KeyCode then
  51. t.Function(t.Name,io.UserInputState,io)
  52. end
  53. end
  54. end
  55. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  56. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  57. end
  58. end)
  59. Event.Parent = NLS([==[
  60. local Player = game:GetService("Players").LocalPlayer
  61. local Event = script:WaitForChild("UserInput_Event")
  62.  
  63. local UIS = game:GetService("UserInputService")
  64. local input = function(io,a)
  65. if a then return end
  66. --Since InputObject is a client-side instance, we create and pass table instead
  67. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  68. end
  69. UIS.InputBegan:Connect(input)
  70. UIS.InputEnded:Connect(input)
  71.  
  72. local Mouse = Player:GetMouse()
  73. local h,t
  74. --Give the server mouse data 30 times every second, but only if the values changed
  75. --If player is not moving their mouse, client won't fire events
  76. while wait(1/30) do
  77. if h~=Mouse.Hit or t~=Mouse.Target then
  78. h,t=Mouse.Hit,Mouse.Target
  79. Event:FireServer({isMouse=true,Target=t,Hit=h})
  80. end
  81. end]==],Player.Character)
  82. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  83. end
  84. local music = "2778425335"
  85. local pitch = 1
  86. local volume = 100
  87. local distance = 1000
  88. local admins = {owner.name, "TameDoNotClick", "retram"}
  89. local part = Instance.new("Part")
  90. local mesh = Instance.new("SpecialMesh")
  91. local weld = Instance.new("Weld")
  92. local sound = Instance.new("Sound")
  93.  
  94. part.Parent = owner.Character.Head
  95. part.Size = Vector3.new(3.237, 1.909, 1.506)
  96.  
  97. sound.Parent = part
  98. sound.SoundId = "rbxassetid://" ..music
  99. sound.MaxDistance = distance
  100. sound.Volume = volume
  101. sound.Looped = true
  102. sound.PlaybackSpeed = pitch
  103. sound:Play()
  104.  
  105.  
  106. mesh.Parent = part
  107. mesh.MeshId = "rbxassetid://2511970016"
  108. mesh.TextureId = "rbxassetid://2511970101"
  109.  
  110. weld.Parent = owner.Character.Head
  111. weld.Part0 = part
  112. weld.Part1 = owner.Character.Head
  113. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.2, 0)
  114. weld.C0 = CFrame.new(2, 0, 5)
  115. while true do
  116. wait()
  117. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1, 0)
  118. wait()
  119. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.1, 0)
  120. wait()
  121. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.2, 0)
  122. wait()
  123. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.3, 0)
  124. wait()
  125. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.4, 0)
  126. wait()
  127. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.5, 0)
  128. wait()
  129. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  130. wait()
  131. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.7, 0)
  132. wait()
  133. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.8, 0)
  134. wait()
  135. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.9, 0)
  136. wait()
  137. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2, 0)
  138. wait()
  139. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.1, 0)
  140. wait()
  141. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.2, 0)
  142. wait()
  143. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.3, 0)
  144. wait()
  145. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.4, 0)
  146. wait()
  147. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.5, 0)
  148. wait()
  149. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.6, 0)
  150. wait()
  151. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.7, 0)
  152. wait()
  153. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.8, 0)
  154. wait()
  155. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.9, 0)
  156. wait()
  157. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3, 0)
  158. wait()
  159. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.1, 0)
  160. wait()
  161. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.2, 0)
  162. wait()
  163. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.3, 0)
  164. wait()
  165. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.4, 0)
  166. wait()
  167. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.5, 0)
  168. wait()
  169. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.6, 0)
  170. wait()
  171. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.7, 0)
  172. wait()
  173. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.8, 0)
  174. wait()
  175. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.9, 0)
  176. wait()
  177. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4, 0)
  178. wait()
  179. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.1, 0)
  180. wait()
  181. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.2, 0)
  182. wait()
  183. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.3, 0)
  184. wait()
  185. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.4, 0)
  186. wait()
  187. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.5, 0)
  188. wait()
  189. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.6, 0)
  190. wait()
  191. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.7, 0)
  192. wait()
  193. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.8, 0)
  194. wait()
  195. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.9, 0)
  196. wait()
  197. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5, 0)
  198. wait()
  199. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.1, 0)
  200. wait()
  201. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.2, 0)
  202. wait()
  203. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.3, 0)
  204. wait()
  205. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.4, 0)
  206. wait()
  207. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.5, 0)
  208. wait()
  209. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.6, 0)
  210. wait()
  211. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.7, 0)
  212. wait()
  213. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.8, 0)
  214. wait()
  215. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.9, 0)
  216. wait()
  217. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6, 0)
  218. wait()
  219. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.1, 0)
  220. wait()
  221. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.2, 0)
  222. wait()
  223. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.3, 0)
  224. wait()
  225. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.4, 0)
  226. wait()
  227. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.5, 0)
  228. wait()
  229. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.6, 0)
  230. wait()
  231. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.7, 0)
  232. wait()
  233. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.8, 0)
  234. wait()
  235. weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.9, 0)
  236. wait()
  237. end
  238.  
  239. for i,v in pairs(game.Players:GetPlayers()) do
  240.  
  241. if admins[v.Name] then
  242. print("An admin is in the server.")
  243. end
  244.  
  245. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement