Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- 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
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- --Saz
- vPlayer=owner
- Tool=Instance.new("Tool")
- Tool.Name="KILL"
- Tool.Parent=vPlayer.Backpack
- Handle=Instance.new("Part")
- Handle.Size=Vector3.new(2.6,2.6,2.6)
- Handle.TopSurface=0
- Handle.BottomSurface=0
- Handle.Name="Handle"
- Handle.formFactor="Custom"
- Handle.Parent=Tool
- Handle.BrickColor=BrickColor:Red()
- Tool.GripRight=Vector3.new(0,0,1)
- Tool.GripPos=Vector3.new(-1.08,-.1,.1)
- m=Instance.new("SpecialMesh")
- m.MeshType="FileMesh"
- m.MeshId="rbxassetid://434871883"
- m.Parent=Handle
- m.Scale=Vector3.new(.50,.50,.50)
- deb=true
- onClick=function()
- if deb==false then
- return
- end
- deb=false
- e=0
- rs=vPlayer.Character["Torso"]["Right Shoulder"]
- s=Instance.new("Sound")
- s.SoundId="http://www.roblox.com/asset/?id=622342161"
- s.Volume=1
- s.Parent=Tool.Handle
- s:Play()
- game:GetService("Debris"):AddItem(s,5)
- wait(0.1)
- lolol=rs.C0
- for i=1, 4 do
- rs.C0=rs.C0*CFrame.fromEulerAnglesXYZ(0,0,math.rad(30))
- wait(.031)
- end
- for i=1, 2 do
- rs.C0=rs.C0*CFrame.fromEulerAnglesXYZ(0,0,-math.rad(30))
- wait(.031)
- end
- --throw
- hh=Tool.Handle:clone()
- Tool.Handle.Transparency=1
- hh.CanCollide=true
- hh.Parent=workspace
- hh.Velocity=dir*200+Vector3.new(0,5,0)
- ff=Instance.new("BodyForce")
- ff.force=Vector3.new(0,hh:GetMass()*140,0)
- ff.Parent=hh
- for i=1, 2 do
- rs.C0=rs.C0*CFrame.fromEulerAnglesXYZ(0,0,-math.rad(30))
- hh.Velocity=dir*300
- wait(.031)
- end
- hh.Touched:connect(function(hit)
- if hit==nil then return end
- if hit.Parent==nil then return end
- if hit.Parent:FindFirstChild("Humanoid")~=nil and hh:FindFirstChild("Hit")==nil
- if hit.Parent==owner
- hit.Parent:BreakJoints()
- s=Instance.new("Sound")
- s.Volume=1
- s.Parent=hh
- s.Name="Hit1"
- s.SoundId="http://www.roblox.com/asset/?id=970428619"
- s:Play()
- for i=1, 4 do
- s5=Instance.new("Sound")
- s5.Volume=1
- s5.Parent=hh
- s5.Name="Hit"
- s5.SoundId="http://www.roblox.com/asset/?id=970428619"
- s5.Pitch=.85
- s5:Play()
- end
- for _,v in pairs(hit.Parent:children()) do
- if v:IsA("BasePart") then
- v.Velocity=(v.Position - hh.Position).unit * 90 + Vector3.new(math.random(-20,20),math.random(0,20),math.random(-20,20))
- v.RotVelocity=-v.Velocity * 1.2
- end
- end
- hh.Transparency=1
- for i=1, 30 do
- p=Instance.new("Part")
- p.TopSurface=0
- p.BottomSurface=0
- p.Name="Shard"
- p.CFrame=hh.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) + Vector3.new(math.random(-15,15)/10,math.random(-15,15)/10,math.random(-15,15)/10)
- p.BrickColor=hh.BrickColor
- p.CanCollide=false
- p.formFactor="Custom"
- p.Size=Vector3.new(10,10,10)
- if math.random(1,3)==1 then
- m=Instance.new("BlockMesh")
- m.Scale=Vector3.new(math.random(10,15)/10,.2,math.random(10,15)/10)
- m.Parent=p
- else
- m=Instance.new("SpecialMesh")
- m.MeshType="Wedge"
- m.Scale=Vector3.new(math.random(10,15)/10,.2,math.random(10,15)/10)
- m.Parent=p
- end
- p.RotVelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- p.Velocity=p.RotVelocity + Vector3.new(0,25,0) + hh.Velocity / 6
- p.Parent=workspace
- end
- hh.Anchored=true
- end
- if hit.Parent:FindFirstChild("Humanoid")==nil and hh:FindFirstChild("Hit")==nil and hit.CanCollide==true then
- hh.Transparency=1
- for i=1, 30 do
- p=Instance.new("Part")
- p.TopSurface=0
- p.BottomSurface=0
- p.Name="Shard"
- p.CFrame=hh.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) + Vector3.new(math.random(-15,15)/10,math.random(-15,15)/10,math.random(-15,15)/10)
- p.BrickColor=hh.BrickColor
- p.CanCollide=false
- p.formFactor="Custom"
- p.Size=Vector3.new(10,10,10)
- if math.random(1,3)==1 then
- m=Instance.new("BlockMesh")
- m.Scale=Vector3.new(math.random(10,15)/10,.2,math.random(10,15)/10)
- m.Parent=p
- else
- m=Instance.new("SpecialMesh")
- m.MeshType="Wedge"
- m.Scale=Vector3.new(math.random(10,15)/10,.2,math.random(10,15)/10)
- m.Parent=p
- end
- p.RotVelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- p.Velocity=p.RotVelocity + Vector3.new(0,25,0) + hh.Velocity / 6
- p.Parent=workspace
- end
- for i=1, 4 do
- s5=Instance.new("Sound")
- s5.Volume=5
- s5.Parent=hh
- s5.Name="Hit"
- s5.SoundId="http://www.roblox.com/asset/?id=970428619"
- s5.Pitch=.85
- s5:Play()
- end
- hh.Anchored=true
- end
- end)
- game:GetService("Debris"):AddItem(hh,5)
- wait(1.0)
- Tool.Handle.Transparency=0
- deb=true
- end
- Tool.Activated:connect(onClick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement