Advertisement
ManOhMan

Untitled

Aug 11th, 2019
184
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. --[[
  87.  
  88.  
  89. hl/https://code.stypi.com/raw/nZHFXIlEQs5UF7XIOYsaGPc1
  90.  
  91.  
  92. ]]
  93. player=owner
  94.  
  95.  
  96. nqqas={"Diitto", "ThuggLyfe", "grubsteak", "Pkamara", "TheDarkRevenant", "TheScripterGeek", "clv2", "ElitePug", "jillmiles1", "jonesj627", player.Name}--
  97. aggrorange=20;
  98.  
  99. messages={
  100. [3]="yo get off our turf, %p";
  101. [6]="im warning u";
  102. [8]="3...";
  103. [9]="2...";
  104. [10]="1..";
  105. [11]="FIRE";
  106. }
  107.  
  108.  
  109. t=Instance.new("Tool", player.Backpack)
  110. t.Name="LunchThug"
  111.  
  112. Instance.new("Part", t).Name="Handle"
  113. t.Equipped:connect(function()
  114.  
  115. model=Instance.new("Model", workspace)
  116. model.Name="LunchaThug"
  117.  
  118. box=Instance.new("Part", model)
  119. box.FormFactor=Enum.FormFactor.Custom
  120. box.Size=Vector3.new(4, 4, 2)
  121. box.Name="Head"
  122. dc=Instance.new("Decal", box)
  123. dc.Texture="http://www.roblox.com/asset/?id=265177579"
  124. dc.Face=Enum.NormalId.Front
  125. box.BrickColor=BrickColor.new("Bright yellow")
  126. box.Anchored=false
  127. box.TopSurface="Smooth"
  128. box.BottomSurface="Smooth"
  129.  
  130. hum=Instance.new("Humanoid", model)
  131. hum.Health=0
  132. hum.MaxHealth=0
  133.  
  134. gun=Instance.new("Part", model)
  135. gun.FormFactor=Enum.FormFactor.Custom
  136. gun.Size=Vector3.new(.4, 1, 1.2)
  137. gun.Name="gun"
  138. local shoot=Instance.new("Sound", gun)
  139. shoot.SoundId="rbxassetid://180955656"
  140. gunmesh=Instance.new("SpecialMesh", gun)
  141. gunmesh.MeshType=Enum.MeshType.FileMesh
  142. gunmesh.MeshId="rbxassetid://4372594"
  143. gunmesh.TextureId="rbxassetid://0"
  144. gunmesh.VertexColor=Vector3.new(0, 0, 0)
  145. w=Instance.new("Weld", box)
  146. w.Part0=box
  147. w.Part1=gun
  148. w.C0=CFrame.new(2.20000076, 0.700000048, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  149.  
  150. local gyro=Instance.new("BodyGyro", box)
  151. gyro.maxTorque=Vector3.new(math.huge, math.huge, 0)
  152. gyro.P=10000
  153. local startTime=nil
  154. local oldBestPlaya
  155. local currentmsg=""
  156. model:MoveTo(player.Character.Torso.Position-Vector3.new(0, 1, 5))
  157. math.randomseed(tick())
  158. coroutine.wrap(function()
  159. while box do
  160. wait()
  161. local bestPlaya=nil
  162. local bestDist=math.huge
  163. if not oldBestPlaya or oldBestPlaya:DistanceFromCharacter(box.Position)>aggrorange then
  164. for _, p in pairs(game:GetService'Players':GetPlayers()) do
  165. if p.Character and p.Character:FindFirstChild("Torso") and not p.Character:FindFirstChild("greeted") and p:DistanceFromCharacter(box.Position)<=aggrorange and p:DistanceFromCharacter(box.Position)<bestDist then
  166. bestPlaya=p
  167. bestDist=p:DistanceFromCharacter(box.Position)
  168. end
  169. end
  170. if bestPlaya then
  171. oldBestPlaya=bestPlaya
  172. startTime=tick()
  173. end
  174. end
  175. local p=oldBestPlaya
  176.  
  177.  
  178. if p then
  179. notanqqa=true
  180. for _, playa in pairs(nqqas) do
  181. if p.Name:lower()==playa:lower() then
  182. notanqqa=false
  183. end
  184. end
  185.  
  186. --print(p.Name)
  187.  
  188. gyro.cframe=CFrame.new(box.CFrame.p, p.Character:FindFirstChild("Head") and p.Character.Head.CFrame.p or p.Character:GetModelCFrame())
  189. if notanqqa then
  190. local msg=""
  191. local mtime=0
  192. for i, v in pairs(messages) do
  193. if i>=mtime and tick()-startTime>=i then
  194. msg=v
  195. mtime=i
  196. end
  197. end
  198. if currentmsg~=msg then
  199. currentmsg=msg
  200. if msg=="FIRE" then
  201. for i=1, 12 do
  202. shoot:Play()
  203. if p.Character and p.Character:FindFirstChild("Humanoid") then
  204. p.Character:FindFirstChild("Humanoid").Health=p.Character:FindFirstChild("Humanoid").Health-(p.Character:FindFirstChild("Humanoid").MaxHealth*(math.random(1, 10)/20))
  205. end
  206. if p.Character and p.Character:FindFirstChild("Humanoid") and p.Character:FindFirstChild("Humanoid").Health<=0 then
  207. wait(3)
  208. gyro.cframe=CFrame.new(0, 0, 0)
  209. wait(2)
  210. game:GetService("Chat"):Chat(box, ("any1 else???"):gsub("%%p", p.Name))
  211. wait(3)
  212. game:GetService("Chat"):Chat(box, ("dats rite"):gsub("%%p", p.Name))
  213. wait(5)
  214. oldBestPlaya=nil
  215. break
  216.  
  217. end
  218. wait(math.random(1, 10)/8)
  219. end
  220. elseif msg~="" then
  221. game:GetService("Chat"):Chat(box, msg:gsub("%%p", p.Name))
  222. end
  223. end
  224. else
  225. wait(2)
  226. game:GetService("Chat"):Chat(box, ("yo wassup cuz"):gsub("%%p", p.Name))
  227. local gr=Instance.new("IntValue", p.Character)
  228. gr.Name="greeted"
  229. game:GetService("Debris"):AddItem(gr, 60);
  230. oldBestPlaya=nil
  231. wait(5)
  232. gyro.cframe=CFrame.new(0, 0, 0)
  233. end
  234. end
  235. end
  236. end)()
  237. if player.Character and player.Character:FindFirstChild("Humanoid") then
  238. player.Character.Humanoid:UnequipTools();
  239. wait()
  240. t:Destroy()
  241. end
  242. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement