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 function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Script1 = Instance.new("Script")
- LocalScript2 = Instance.new("LocalScript")
- RemoteEvent3 = Instance.new("RemoteEvent")
- Part4 = Instance.new("Part")
- Script5 = Instance.new("Script")
- Script6 = Instance.new("Script")
- Script7 = Instance.new("Script")
- Sound8 = Instance.new("Sound")
- Sound8.Name = "Sound2"
- killsound = Instance.new("Sound")
- Script9 = Instance.new("Script")
- LocalScript10 = Instance.new("LocalScript")
- Tool0.Name = "Heavy Barrel"
- Tool0.Parent = mas
- Script1.Parent = Tool0
- table.insert(cors,sandbox(Script1,function()
- --[[
- Rewritten by ArceusInator
- - Completely rewrote the sword
- - Added a Configurations folder so damage settings can be easily modified
- - The sword runs on the client in non-FE to reduce the impression of input delay
- - Fixed the floaty lunge issue
- This script will run the sword code on the server if filtering is enabled
- --]]
- local Tool = script.Parent
- local GLib = require(206209239)
- local GLibScript = GLib.Script
- GLibScript.Name = 'GLib'
- GLibScript.Parent = Tool
- local Sword = require(Tool:WaitForChild'Sword')
- if workspace.FilteringEnabled then
- -- Run the sword code on the server and accept input from the client
- Sword:Initialize()
- Tool:WaitForChild'RemoteClick'.OnServerEvent:connect(function(client, action)
- if client.Character == Tool.Parent then
- Sword:Attack()
- end
- end)
- end
- Tool.Unequipped:connect(function()
- Sword:Unequip()
- end)
- end))
- LocalScript2.Parent = Tool0
- table.insert(cors,sandbox(LocalScript2,function()
- --[[
- Rewritten by ArceusInator
- This script will run the sword code on the client if filtering is disabled
- --]]
- local Tool = script.Parent
- local Sword = require(Tool:WaitForChild'Sword')
- local GLib = require(Tool:WaitForChild'GLib')
- if not workspace.FilteringEnabled then
- -- Run the sword code on the client
- Sword:Initialize()
- end
- Tool.Equipped:connect(function(mouse)
- Tool.Handle.UnsheathSound:Play()
- mouse.Button1Down:connect(function()
- GLib.FastSpawn(function() Sword:LocalAttack() end)
- if workspace.FilteringEnabled then
- -- Send input info to the server
- Tool.RemoteClick:FireServer()
- else
- -- Interpret it on the client
- Sword:Attack()
- end
- end)
- end)
- Tool.Unequipped:connect(function()
- Sword:Unequip()
- end)
- end))
- RemoteEvent3.Name = "RemoteClick"
- RemoteEvent3.Parent = Tool0
- Part4.Name = "Handle"
- Part4.Parent = Tool0
- Part4.Material = Enum.Material.CorrodedMetal
- Part4.BrickColor = BrickColor.new("Dark stone grey")
- Part4.Size = Vector3.new(2.5, 3.5, 2.5)
- Part4.CFrame = CFrame.new(182.000046, 9.10001373, 229.699982, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part4.Color = Color3.new(0.458824, 0, 0)
- Part4.Shape = 2
- Part4.Position = Vector3.new(182.000046, 9.10001373, 229.699982)
- Part4.Color = Color3.new(0.458824, 0, 0)
- Script5.Name = "HatShot"
- Script5.Parent = Part4
- table.insert(cors,sandbox(Script5,function()
- function RemoveHat(hit)
- local name = hit.Parent.className
- if (name == "Hat") then
- local human = hit.Parent.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- hit.Parent:remove()
- end
- end
- end
- connection = script.Parent.Touched:connect(RemoveHat)
- end))
- Script6.Name = "HeadShot"
- Script6.Parent = Part4
- table.insert(cors,sandbox(Script6,function()
- function blood(hit)
- local name = hit.Name
- if (name == "Head") then
- local human = hit.Parent:findFirstChild("Humanoid") or hit.Parent:findFirstChild("Zombie") or hit.Parent:findFirstChild("Alien")
- if (human ~= nil) then
- local h = hit.Parent:findFirstChild("Head")
- local t = hit.Parent:findFirstChild("Torso")
- local b = hit.Parent:findFirstChild("Humanoid")
- if (h ~= nil) and (t ~= nil) then
- local x = h.Position.x
- local y = h.Position.y
- local z = h.Position.z
- local x1 = x + 1
- local y1 = y + 1
- local z1 = z + 1
- local x2 = x - 1
- local y2 = y - 1
- local z2 = z - 1
- local b1 = Instance.new("Part")
- b1.Parent = h.Parent
- b1.BrickColor = BrickColor.new("Crimson")
- b1.formFactor = 2
- b1.Name = "Part"
- b1.Size = Vector3.new(1, 0., 1)
- b1.Position = Vector3.new(x, y1, z)
- b1.Locked = true
- local b2 = Instance.new("Part")
- b2.Parent = h.Parent
- b2.BrickColor = BrickColor.new("Crimson")
- b2.formFactor = 2
- b2.Name = "Part"
- b2.Size = Vector3.new(1, 0.05, 1)
- b2.Position = Vector3.new(x1, y, z)
- b2.Locked = true
- local b3 = Instance.new("Part")
- b3.Parent = h.Parent
- b3.BrickColor = BrickColor.new("Crimson")
- b3.formFactor = 2
- b3.Name = "Part"
- b3.Size = Vector3.new(1, 0.05, 1)
- b3.Position = Vector3.new(x, y, z1)
- b3.Locked = true
- local b4 = Instance.new("Part")
- b4.Parent = h.Parent
- b4.BrickColor = BrickColor.new("Crimson")
- b4.formFactor = 2
- b4.Name = "Part"
- b4.Size = Vector3.new(1, 0.05, 1)
- b4.Position = Vector3.new(x, y2, z)
- b4.Locked = true
- local b5 = Instance.new("Part")
- b5.Parent = h.Parent
- b5.BrickColor = BrickColor.new("Crimson")
- b5.formFactor = 2
- b5.Name = "Part"
- b5.Size = Vector3.new(1, 0.05, 1)
- b5.Position = Vector3.new(x2, y, z)
- b5.Locked = true
- local b6 = Instance.new("Part")
- b6.Parent = h.Parent
- b6.BrickColor = BrickColor.new("Crimson")
- b6.formFactor = 2
- b6.Name = "Part"
- b6.Size = Vector3.new(1, 0.05, 1)
- b6.Position = Vector3.new(x, y, z2)
- b6.Locked = true
- local b1a = Instance.new("Part")
- b1a.Parent = h.Parent
- b1a.BrickColor = BrickColor.new("Crimson")
- b1a.formFactor = 2
- b1a.Name = "Part"
- b1a.Size = Vector3.new(1, 0., 1)
- b1a.Position = Vector3.new(x, y1 + 1, z)
- b1a.Locked = true
- local b2a = Instance.new("Part")
- b2a.Parent = h.Parent
- b2a.BrickColor = BrickColor.new("Crimson")
- b2a.formFactor = 2
- b2a.Name = "Part"
- b2a.Size = Vector3.new(1, 0.05, 1)
- b2a.Position = Vector3.new(x1, y + 1, z)
- b2a.Locked = true
- local b3a = Instance.new("Part")
- b3a.Parent = h.Parent
- b3a.BrickColor = BrickColor.new("Crimson")
- b3a.formFactor = 2
- b3a.Name = "Part"
- b3a.Size = Vector3.new(1, 0.05, 1)
- b3a.Position = Vector3.new(x, y + 1, z1)
- b3a.Locked = true
- local b4a = Instance.new("Part")
- b4a.Parent = h.Parent
- b4a.BrickColor = BrickColor.new("Crimson")
- b4a.formFactor = 2
- b4a.Name = "Part"
- b4a.Size = Vector3.new(1, 0.05, 1)
- b4a.Position = Vector3.new(x, y2 + 1, z)
- b4a.Locked = true
- local b5a = Instance.new("Part")
- b5a.Parent = h.Parent
- b5a.BrickColor = BrickColor.new("Crimson")
- b5a.formFactor = 2
- b5a.Name = "Part"
- b5a.Size = Vector3.new(1, 0.05, 1)
- b5a.Position = Vector3.new(x2, y + 1, z)
- b5a.Locked = true
- local b6a = Instance.new("Part")
- b6a.Parent = h.Parent
- b6a.BrickColor = BrickColor.new("Crimson")
- b6a.formFactor = 2
- b6a.Name = "Part"
- b6a.Size = Vector3.new(1, 0.05, 1)
- b6a.Position = Vector3.new(x, y + 1, z2)
- b6a.Locked = true
- h:remove()
- local bd1 = Instance.new("Decal")
- bd1.Parent = t
- bd1.Name = "Blood"
- bd1.Texture = "http://www.roblox.com/asset/?id=2520255"
- bd1.Face = 0
- local bd2 = Instance.new("Decal")
- bd2.Parent = t
- bd2.Name = "Blood"
- bd2.Texture = "http://www.roblox.com/asset/?id=2520270"
- bd2.Face = 1
- local bd3 = Instance.new("Decal")
- bd3.Parent = t
- bd3.Name = "Blood"
- bd3.Texture = "http://www.roblox.com/asset/?id=2520255"
- bd3.Face = 2
- local bd4 = Instance.new("Decal")
- bd4.Parent = t
- bd4.Name = "Blood"
- bd4.Texture = "http://www.roblox.com/asset/?id=2520255"
- bd4.Face = 3
- local bd5 = Instance.new("Decal")
- bd5.Parent = t
- bd5.Name = "Blood"
- bd5.Texture = "http://www.roblox.com/asset/?id=2520270"
- bd5.Face = 4
- local bd6 = Instance.new("Decal")
- bd6.Parent = t
- bd6.Name = "Blood"
- bd6.Texture = "http://www.roblox.com/asset/?id=2520255"
- bd6.Face = 5
- end
- end
- end
- end
- connection = script.Parent.Touched:connect(blood)
- end))
- Script7.Parent = Part4
- table.insert(cors,sandbox(Script7,function()
- function touch()
- script.Parent.Sound:Play()
- script.Parent.Sound2:Play()
- wait(3)
- end
- script.Parent.Touched:connect(touch)
- end))
- Sound8.Parent = Part4
- Sound8.Pitch = 0.75
- Sound8.SoundId = "rbxassetid://429400881"
- Sound8.Volume = 0.5
- killsound.SoundId = "http://www.roblox.com/asset?id=418658161"
- killsound.Pitch = 0.85
- killsound.TimePosition = 3
- killsound.Parent = Part4
- Script9.Name = "SpeedBoostScript"
- Script9.Parent = Tool0
- Script9.Disabled = true
- table.insert(cors,sandbox(Script9,function()
- --Made by Stickmasterluke
- sp=script.Parent
- speedboost=1 --100% speed bonus
- speedforsmoke=10 --smoke apears when character running >= 10 studs/second.
- function waitfor(a,b,c)
- local c=c or 5*60
- local d=tick()+c
- while a:FindFirstChild(b)==nil and tick()<=d do
- wait()
- end
- return a:FindFirstChild(b)
- end
- local tooltag=waitfor(script,"ToolTag",2)
- if tooltag~=nil then
- local tool=tooltag.Value
- local h=sp:FindFirstChild("Humanoid")
- if h~=nil then
- h.WalkSpeed=16+64*speedboost
- local t=sp:FindFirstChild("Torso")
- if t~=nil then
- smokepart=Instance.new("Part")
- smokepart.FormFactor="Custom"
- smokepart.Size=Vector3.new(0,0,0)
- smokepart.TopSurface="Smooth"
- smokepart.BottomSurface="Smooth"
- smokepart.CanCollide=false
- smokepart.Transparency=1
- local weld=Instance.new("Weld")
- weld.Name="SmokePartWeld"
- weld.Part0=t
- weld.Part1=smokepart
- weld.C0=CFrame.new(0,-3.5,0)*CFrame.Angles(math.pi/4,0,0)
- weld.Parent=smokepart
- smokepart.Parent=sp
- smoke=Instance.new("Smoke")
- smoke.Enabled=t.Velocity.magnitude>speedforsmoke
- smoke.RiseVelocity=2
- smoke.Opacity=.25
- smoke.Size=.5
- smoke.Parent=smokepart
- h.Running:connect(function(speed)
- if smoke and smoke~=nil then
- smoke.Enabled=speed>speedforsmoke
- end
- end)
- end
- end
- while tool~=nil and tool.Parent==sp and h~=nil do
- sp.ChildRemoved:wait()
- end
- local h=sp:FindFirstChild("Humanoid")
- if h~=nil then
- h.WalkSpeed=16
- end
- end
- if smokepart~=nil then
- smokepart:remove()
- end
- script:remove()
- end))
- LocalScript10.Parent = Tool0
- table.insert(cors,sandbox(LocalScript10,function()
- --Made by Stickmasterluke
- sp=script.Parent
- function waitfor(a,b)
- while a:FindFirstChild(b)==nil do
- a.ChildAdded:wait()
- end
- return a:FindFirstChild(b)
- end
- speedboostscript=waitfor(sp,"SpeedBoostScript")
- function Equipped()
- if sp.Parent:FindFirstChild("SpeedBoostScript")==nil then
- local s=speedboostscript:clone()
- local tooltag=Instance.new("ObjectValue")
- tooltag.Name="ToolTag"
- tooltag.Value=sp
- tooltag.Parent=s
- s.Parent=sp.Parent
- s.Disabled=false
- local sound=sp.Handle:FindFirstChild("CoilSound")
- if sound~=nil then
- sound:Play()
- end
- end
- end
- sp.Equipped:connect(Equipped)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement