Advertisement
lafur

Untitled

Nov 3rd, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  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. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end --CREDITS TO XXJOJETXX
  6. -- DONT EDIT THIS SCRIPT UNLESS U KNOW WHAT YOU ARE DOING!
  7. -- VERSION 1
  8. -- DONT ABUSE ON VOIDACITY OR GET BANNNED
  9.  
  10. local player = game.Players.LocalPlayer
  11. local mouse = player:GetMouse()
  12.  
  13. local tool = Instance.new("Tool", player.Backpack)
  14. tool.Name = "Doom Cannon"
  15. tool.GripUp = Vector3.new(0, 0, 1)
  16.  
  17. local handle = Instance.new("Part", tool)
  18. handle.Name = "Handle"
  19. handle.Anchored = false
  20.  
  21. local gunmesh = Instance.new("SpecialMesh", handle)
  22. gunmesh.MeshId = "http://www.roblox.com/asset/?id=78002401"
  23. gunmesh.TextureId = "rbxassetid://78002441"
  24.  
  25.  
  26. tool.Equipped:connect(function(mouse)
  27.  
  28. mouse.Button1Down:connect(function()
  29. local ray = Ray.new(handle.CFrame.p, (mouse.Hit.p - handle.CFrame.p).unit * 300)
  30. local human, position = workspace:FindPartOnRay(ray, player.Character, false, true)
  31.  
  32. local bullet = Instance.new("Part", workspace)
  33. bullet.BrickColor = BrickColor.new("Black")
  34. bullet.Material = "Neon"
  35. bullet.TopSurface = "Smooth"
  36. bullet.BottomSurface = "Smooth"
  37. bullet.Locked = true
  38. bullet.Anchored = true
  39. bullet.CanCollide = false
  40.  
  41. local distance = (handle.CFrame.p - position).magnitude
  42. bullet.Size = Vector3.new(0.5, 0.5, distance)
  43. bullet.CFrame = CFrame.new(handle.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  44.  
  45. game:GetService("Debris"):AddItem(bullet, 0.1)
  46.  
  47. if human then
  48.  
  49. if human then
  50. local human = human.Parent:FindFirstChild("Humanoid")
  51.  
  52. if not human then
  53. human = human.Parent.Parent:FindFirstChild("Humanoid")
  54. print("Not Mob")
  55. end
  56.  
  57. if human then
  58. human:TakeDamage(10 * 2)
  59. human.Parent.Torso.BrickColor = BrickColor.new("Black")
  60. human.Parent.Head.BrickColor = BrickColor.new("Black")
  61. human.Parent:FindFirstChild("Left Arm").BrickColor = BrickColor.new("Black")
  62. human.Parent:FindFirstChild("Right Arm").BrickColor = BrickColor.new("Black")
  63. human.Parent:FindFirstChild("Left Leg").BrickColor = BrickColor.new("Black")
  64. human.Parent:FindFirstChild("Right Leg").BrickColor = BrickColor.new("Black")
  65. while true do
  66.  
  67. for i = 1,10 do
  68. wait(0.1)
  69.  
  70. human.Parent.Torso.Size = human.Torso.Size - Vector3.new(1,1,1)
  71. human.Parent.Head.Size = human.Torso.Size - Vector3.new(1,1,1)
  72. human.Parent:FindFirstChild("Left Arm").Size = human.Torso.Size - Vector3.new(1,1,1)
  73. human.Parent:FindFirstChild("Right Arm").Size = human.Torso.Size - Vector3.new(1,1,1)
  74. human.Parent:FindFirstChild("Left Leg").Size = human.Torso.Size - Vector3.new(1,1,1)
  75. human.Parent:FindFirstChild("Right Leg").Size = human.Torso.Size - Vector3.new(1,1,1)
  76. end
  77. end
  78.  
  79.  
  80. end
  81.  
  82. end
  83. end
  84.  
  85.  
  86.  
  87. end)
  88. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement