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,game,owner = owner,game
- local RealPlayer = Player
- do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
- --By Rufus14
- mouse = game.Players.LocalPlayer:GetMouse()
- gun = Instance.new("Part", game.Players.LocalPlayer.Character)
- gun.Size = Vector3.new(0.5, 1, 2)
- gun.CanCollide = false
- gun:BreakJoints()
- weld = Instance.new("Weld", gun)
- weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
- weld.Part1 = gun
- weld.C0 = weld.C0 * CFrame.new(-0.2,-1.7,-0.25) * CFrame.Angles(0,1.6,-1.53)
- mesh = Instance.new("SpecialMesh", gun)
- mesh.MeshId = "rbxassetid://623102664"
- mesh.TextureId = "rbxassetid://623102879"
- mesh.Scale = Vector3.new(0.01,0.01,0.01)
- local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
- rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
- rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
- rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- rhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- shooting = false
- for i = 1,2 do
- wait()
- rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
- end
- for i = 1,2 do
- wait()
- rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
- end
- for i = 1,7 do
- wait()
- rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.17)
- end
- for i = 1,2 do
- wait()
- rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
- end
- for i = 1,2 do
- wait()
- rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
- end
- function shoot()
- if not shooting then
- shooting = true
- local shotsound = Instance.new("Sound", gun)
- shotsound.EmitterSize = 1
- shotsound.SoundId = "rbxassetid://139593133"
- shotsound.Volume = 3
- shotsound:Play()
- local missle = Instance.new("Part", workspace)
- missle.Size = Vector3.new(0.05,0.05,0.05)
- missle.BrickColor = BrickColor.new("New Yeller")
- missle:BreakJoints()
- missle.CFrame = gun.CFrame
- local velo = Instance.new("BodyVelocity", missle)
- velo.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- velo.Velocity = mouse.Hit.lookVector * 190
- for i = 1,2 do
- weld.C0 = weld.C0 * CFrame.Angles(0,0,0.14)
- rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.14)
- end
- for i = 1,2 do
- wait()
- weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
- rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
- end
- local function kill(part)
- local hum = part.Parent:findFirstChild("Humanoid")
- local torso = part.Parent:findFirstChild("Torso")
- local larm = part.Parent:findFirstChild("Left Arm")
- local rarm = part.Parent:findFirstChild("Right Arm")
- local lleg = part.Parent:findFirstChild("Left Leg")
- local rleg = part.Parent:findFirstChild("Right Leg")
- missle:destroy()
- if hum ~= nil then
- if torso then
- hum.Health = hum.Health - math.random(25,68)
- local shotsound1 = Instance.new("Sound", torso)
- shotsound1:Play()
- shotsound1.EmitterSize = 1
- shotsound1.SoundId = "rbxassetid://144884872"
- shotsound1.Volume = 2
- shotsound1:Play()
- local shotsound1 = Instance.new("Sound", torso)
- shotsound1:Play()
- shotsound1.EmitterSize = 1
- shotsound1.SoundId = "rbxassetid://175272131"
- shotsound1.Volume = 2
- shotsound1:Play()
- using = false
- hit = Instance.new("Sound", torso)
- hit.SoundId = "rbxassetid://260430060"
- hit.Volume = 5
- hit1 = Instance.new("Sound", torso)
- hit1.SoundId = "rbxassetid://138087186"
- hit1.Volume = 5
- hit2 = Instance.new("Sound", torso)
- hit2.SoundId = "rbxassetid://131237241"
- hit2.Volume = 5
- hit3 = Instance.new("Sound", torso)
- hit3.SoundId = "rbxassetid://278062209"
- hit3.Volume = 5
- hit3.TimePosition = 0.33
- print("You killed "..hum.Parent.Name)
- hum.PlatformStand = true
- ----------
- local lhip = torso:findFirstChild("Left Hip")
- if lhip then
- ---
- torso["Left Hip"]:destroy()
- local head = game.Players.LocalPlayer.Character.Head
- local glue = Instance.new("Glue", torso)
- glue.Part0 = torso
- glue.Part1 = torso.Parent["Left Leg"]
- glue.Name = "Left leg"
- local collider = Instance.new("Part", torso.Parent["Left Leg"])
- collider.Position = Vector3.new(0,999,0)
- collider.Size = Vector3.new(1.7, 1, 1)
- collider.Shape = "Cylinder"
- local weld = Instance.new("Weld", collider)
- weld.Part0 = torso.Parent["Left Leg"]
- weld.Part1 = collider
- weld.C0 = CFrame.Angles(0, 0, 80)
- collider.TopSurface = "Smooth"
- collider.BottomSurface = "Smooth"
- collider.formFactor = "Symmetric"
- glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- collider.Transparency = 1
- end
- local rhip = torso:findFirstChild("Right Hip")
- if rhip then
- ------------
- torso["Right Hip"]:destroy()
- local glue1 = Instance.new("Glue", torso)
- glue1.Part0 = torso
- glue1.Part1 = torso.Parent["Right Leg"]
- glue1.Name = "Right leg"
- local collider1 = Instance.new("Part", torso.Parent["Right Leg"])
- collider1.Position = Vector3.new(0,9999,0)
- collider1.Size = Vector3.new(1.7, 1, 1)
- collider1.Shape = "Cylinder"
- local weld1 = Instance.new("Weld", collider1)
- weld1.Part0 = torso.Parent["Right Leg"]
- weld1.Part1 = collider1
- weld1.C0 = CFrame.Angles(0, 0, 80)
- collider1.TopSurface = "Smooth"
- collider1.BottomSurface = "Smooth"
- collider1.formFactor = "Symmetric"
- glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- collider1.Transparency = 1
- end
- ------------
- local rshoulder = torso:findFirstChild("Right Shoulder")
- if rshoulder then
- torso["Right Shoulder"]:destroy()
- local glue11 = Instance.new("Glue", torso)
- glue11.Part0 = torso
- glue11.Part1 = torso.Parent["Right Arm"]
- glue11.Name = "Right shoulder"
- local collider11 = Instance.new("Part", torso.Parent["Right Arm"])
- collider11.Position = Vector3.new(0,9999,0)
- collider11.Size = Vector3.new(1.8,1,1)
- collider11.Shape = "Cylinder"
- local weld11 = Instance.new("Weld", collider11)
- weld11.Part0 = torso.Parent["Right Arm"]
- weld11.Part1 = collider11
- weld11.C0 = CFrame.Angles(0, 0, 80)
- collider11.TopSurface = "Smooth"
- collider11.BottomSurface = "Smooth"
- collider11.formFactor = "Symmetric"
- glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- collider11.Transparency = 1
- end
- ------------
- local lshoulder = torso:findFirstChild("Left Shoulder")
- if lshoulder then
- torso["Left Shoulder"]:destroy()
- local glue111 = Instance.new("Glue", torso)
- glue111.Part0 = torso
- glue111.Part1 = torso.Parent["Left Arm"]
- glue111.Name = "Left shoulder"
- local collider111 = Instance.new("Part", torso.Parent["Left Arm"])
- collider111.Position = Vector3.new(0,9999,0)
- collider111.Size = Vector3.new(1.8,1,1)
- collider111.Shape = "Cylinder"
- local weld111 = Instance.new("Weld", collider111)
- weld111.Part0 = torso.Parent["Left Arm"]
- weld111.Part1 = collider111
- weld111.C0 = CFrame.Angles(0, 0, 80)
- collider111.TopSurface = "Smooth"
- collider111.BottomSurface = "Smooth"
- collider111.formFactor = "Symmetric"
- glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- collider111.Transparency = 1
- end
- -----------------
- local sensoring = Instance.new("Part", torso)
- sensoring.Size = Vector3.new(1.2,1.1,0.8)
- sensoring.CanCollide = false
- sensoring.Position = torso.Position
- local welder = Instance.new("Weld", sensoring)
- welder.Part0 = torso
- welder.Part1 = sensoring
- welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
- sensoring.Transparency = 1
- -----------------
- local sensoring1 = Instance.new("Part", torso)
- sensoring1.Size = Vector3.new(1.2,1.1,0.8)
- sensoring1.CanCollide = false
- sensoring1.Position = torso.Position
- local welder1 = Instance.new("Weld", sensoring)
- welder1.Part0 = torso
- welder1.Part1 = sensoring1
- welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
- sensoring1.Transparency = 1
- local function touch()
- if not using then
- using = true
- local Math = math.random(1,4)
- if Math == 1 then
- hit:Play()
- end
- if Math == 2 then
- hit1:Play()
- end
- if Math == 3 then
- hit2:Play()
- end
- if Math == 4 then
- hit3:Play()
- end
- wait(0.1)
- using = false
- end
- end
- sensoring.Touched:connect(touch)
- sensoring1.Touched:connect(touch)
- while true do
- wait(0.3)
- hum.PlatformStand = true
- end
- --di ent
- end
- end
- end
- missle.Touched:connect(kill)
- for i = 1,2 do
- wait()
- weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
- rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
- end
- shooting = false
- wait(3)
- shotsound:destroy()
- end
- end
- mouse.Button1Down:connect(shoot)
Advertisement
Add Comment
Please, Sign In to add comment