Advertisement
wamandnj

Untitled

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