Advertisement
lafur

Untitled

Nov 11th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 --[[ ROCKET THROWER SCRIPT --]]
  6.  
  7. --BY MR STEAL YO BORK
  8. local plr = game.Players.LocalPlayer
  9. local char = plr.Character
  10. local hum = char.Humanoid
  11. local ra = char["Right Arm"]
  12. local bp = plr.Backpack
  13. local tool = Instance.new("Tool", bp)
  14. local handle = Instance.new("Part", tool)
  15. local mesh = Instance.new("SpecialMesh", handle)
  16. local event = Instance.new("RemoteEvent", tool)
  17. local mouse = plr:GetMouse()
  18. local root = char.HumanoidRootPart
  19.  
  20. --=tool=--
  21. tool.Name = "rocket thrower"
  22. tool.GripForward = Vector3.new(-0.102, -0.019, -0.995)
  23. tool.GripPos = Vector3.new(0.132, 0.736, 0.126)
  24. tool.GripRight = Vector3.new(0.995, 0.006, -0.102)
  25. tool.GripUp = Vector3.new(-0.008, 1, -0.018)
  26.  
  27. --=Handle/Mesh=--
  28. handle.Name = "Handle"
  29. mesh.MeshId = "http://www.roblox.com/asset?ID=2251534"
  30. mesh.Offset = Vector3.new(0, 0, 0)
  31. mesh.Scale = Vector3.new(0.5, 0.5, 0.5)
  32. mesh.TextureId = "http://www.roblox.com/asset?ID=2251530"
  33. mesh.VertexColor = Vector3.new(1, 1, 1)
  34.  
  35.  
  36. --=Hax n Debounce=--
  37. wait(1)
  38. local Debounce, DebounceTime = false, 0.1
  39.  
  40. local en = true
  41. tool.Activated:connect(function()
  42. if not Debounce then
  43. Debounce = true
  44. if not en then return end
  45. en = false
  46. event:FireServer(mouse.Hit)
  47.  
  48.  
  49. wait(0.5)
  50. en = true
  51.  
  52. wait(DebounceTime)
  53. Debounce = false
  54. end
  55.  
  56. end)
  57.  
  58. --=Ultra Hax=-
  59. local en = true
  60. tool.Equipped:connect(function(Mouse)
  61. Mouse.Button1Down:connect(function(play)
  62. local s = Instance.new("Sound", tool.Handle)
  63. s.SoundId = "http://www.roblox.com/asset?id=258057783" --446824013
  64. s.Volume = 10
  65. s.Pitch = 1
  66. s.Looped = false
  67. s.archivable = false
  68. local s1 = Instance.new("Sound", tool.Handle)
  69. s1.SoundId = "http://www.roblox.com/asset?id=446824013"
  70. s1.Volume = 5
  71. s1.Pitch = 1
  72. s1.Looped = false
  73. s1.archivable = false
  74. root.CFrame = CFrame.new(root.Position,root.Position + Vector3.new(Mouse.Hit.lookVector.x,0,Mouse.Hit.lookVector.z))
  75. wait(0.3)
  76. local handleclone = tool.Handle:clone()
  77. handleclone.CFrame = tool.Handle.CFrame
  78. local bv = Instance.new("BodyVelocity")
  79. bv.MaxForce = Vector3.new(1e8,1e8,1e8)
  80. bv.Velocity = Mouse.Hit.lookVector * 100
  81. bv.Parent = handleclone
  82. handleclone.CanCollide = false
  83. handleclone.Parent = game.Workspace
  84. game.Debris:AddItem(handleclone,10)
  85. local ten = true
  86. handleclone.Touched:connect(function(hit)
  87. if not ten then return end
  88. ten = false
  89. local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
  90. if ehum and ehum ~= hum then
  91. ehum:TakeDamage(7)
  92. elseif hit.Anchored == true and hit.CanCollide == true then
  93. local ex = Instance.new("Explosion", handleclone)
  94. ex.Position = handleclone.Position
  95. ex.BlastPressure = 10000
  96. ex.BlastRadius = 200
  97. ex.ExplosionType = "CratersAndDebris"
  98. ex.DestroyJointRadiusPercent = 0.5
  99. ex.Hit:connect(function(Part, Distance)
  100. s:play()
  101. s1:play()
  102. s1.TimePosition = 3
  103. wait(10)
  104. s1:Stop()
  105. Part.Anchored = false
  106. if Distance <= 25 then
  107. Part:BreakJoints()
  108. end
  109. end)
  110. end
  111. wait()
  112. ten = true
  113. end)
  114. end)
  115. end)
  116.  
  117. --------------------------------------------------------------------------------------------------------------------------------------=END=--------------------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement