Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- 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 --]]
- --BY MR STEAL YO BORK
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local hum = char.Humanoid
- local ra = char["Right Arm"]
- local bp = plr.Backpack
- local tool = Instance.new("Tool", bp)
- local handle = Instance.new("Part", tool)
- local mesh = Instance.new("SpecialMesh", handle)
- local event = Instance.new("RemoteEvent", tool)
- local mouse = plr:GetMouse()
- local root = char.HumanoidRootPart
- --=tool=--
- tool.Name = "rocket thrower"
- tool.GripForward = Vector3.new(-0.102, -0.019, -0.995)
- tool.GripPos = Vector3.new(0.132, 0.736, 0.126)
- tool.GripRight = Vector3.new(0.995, 0.006, -0.102)
- tool.GripUp = Vector3.new(-0.008, 1, -0.018)
- --=Handle/Mesh=--
- handle.Name = "Handle"
- mesh.MeshId = "http://www.roblox.com/asset?ID=2251534"
- mesh.Offset = Vector3.new(0, 0, 0)
- mesh.Scale = Vector3.new(0.5, 0.5, 0.5)
- mesh.TextureId = "http://www.roblox.com/asset?ID=2251530"
- mesh.VertexColor = Vector3.new(1, 1, 1)
- --=Hax n Debounce=--
- wait(1)
- local Debounce, DebounceTime = false, 0.1
- local en = true
- tool.Activated:connect(function()
- if not Debounce then
- Debounce = true
- if not en then return end
- en = false
- event:FireServer(mouse.Hit)
- wait(0.5)
- en = true
- wait(DebounceTime)
- Debounce = false
- end
- end)
- --=Ultra Hax=-
- local en = true
- tool.Equipped:connect(function(Mouse)
- Mouse.Button1Down:connect(function(play)
- local s = Instance.new("Sound", tool.Handle)
- s.SoundId = "http://www.roblox.com/asset?id=258057783" --446824013
- s.Volume = 10
- s.Pitch = 1
- s.Looped = false
- s.archivable = false
- local s1 = Instance.new("Sound", tool.Handle)
- s1.SoundId = "http://www.roblox.com/asset?id=446824013"
- s1.Volume = 5
- s1.Pitch = 1
- s1.Looped = false
- s1.archivable = false
- root.CFrame = CFrame.new(root.Position,root.Position + Vector3.new(Mouse.Hit.lookVector.x,0,Mouse.Hit.lookVector.z))
- wait(0.3)
- local handleclone = tool.Handle:clone()
- handleclone.CFrame = tool.Handle.CFrame
- local bv = Instance.new("BodyVelocity")
- bv.MaxForce = Vector3.new(1e8,1e8,1e8)
- bv.Velocity = Mouse.Hit.lookVector * 100
- bv.Parent = handleclone
- handleclone.CanCollide = false
- handleclone.Parent = game.Workspace
- game.Debris:AddItem(handleclone,10)
- local ten = true
- handleclone.Touched:connect(function(hit)
- if not ten then return end
- ten = false
- local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if ehum and ehum ~= hum then
- ehum:TakeDamage(7)
- elseif hit.Anchored == true and hit.CanCollide == true then
- local ex = Instance.new("Explosion", handleclone)
- ex.Position = handleclone.Position
- ex.BlastPressure = 10000
- ex.BlastRadius = 200
- ex.ExplosionType = "CratersAndDebris"
- ex.DestroyJointRadiusPercent = 0.5
- ex.Hit:connect(function(Part, Distance)
- s:play()
- s1:play()
- s1.TimePosition = 3
- wait(10)
- s1:Stop()
- Part.Anchored = false
- if Distance <= 25 then
- Part:BreakJoints()
- end
- end)
- end
- wait()
- ten = true
- end)
- end)
- end)
- --------------------------------------------------------------------------------------------------------------------------------------=END=--------------------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement