Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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")
- 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
- wait(1/5)
- local plr = owner
- local C = plr.Character
- local H = C.Humanoid
- local DebrisService = game:GetService('Debris')
- local LARM = C:WaitForChild("Left Arm")
- local RARM = C:WaitForChild("Right Arm")
- local LLEG = C:WaitForChild("Left Leg")
- local RLEG = C:WaitForChild("Right Leg")
- local Head = C.Head
- local Torso = C.Torso
- local Neck = Torso.Neck
- local Root = C.HumanoidRootPart
- local RootJ = Root.RootJoint
- local a = 0
- --[[ Base Varibles ]]--
- local cn = CFrame.new
- local aa = CFrame.Angles
- local ud = UDim2.new
- local c3 = Color3.new
- local sin = math.sin
- local sqrt = math.sqrt
- local rad = math.rad
- local cos = math.cos
- local acos = math.acos
- local abs = math.abs
- local asin = math.asin
- local atan = math.atan
- local atan2 = math.atan2
- local turn = true
- local sit = false
- local fist = false
- local running = false
- local emoting = false
- local attack = false
- local valid_blood = false
- local equiping = false
- local valid_hit = true
- local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- local RootCF = aa(-1.57, 0, 3.14)
- local RHCF = aa(0, 1.6, 0)
- local LHCF = aa(0, -1.6, 0)
- C:WaitForChild('Sound'):Destroy()
- local LH = Torso:WaitForChild("Left Hip")
- local RH = Torso:WaitForChild("Right Hip")
- local RSH = Torso:WaitForChild("Right Shoulder")
- local LSH = Torso:WaitForChild("Left Shoulder")
- RH.Parent = nil
- LH.Parent = nil
- RSH.Parent = nil
- LSH.Parent = nil
- local RL = Instance.new("Weld",Torso)
- RL.Name = "Right Hip"
- RL.Part0 = Torso
- RL.C0 = cn(0, 0, 0)
- RL.C1 = cn(0.5, 1, 0) * aa(0,1.6,0)
- RL.Part1 = RLEG
- local LL = Instance.new("Weld",Torso)
- LL.Name = "Left Hip"
- LL.Part0 = Torso
- LL.C0 = cn(0, 0, 0)
- LL.C1 = cn(-0.5, 1, 0) * aa(0,-1.6,0)
- LL.Part1 = LLEG
- local RA = Instance.new("Weld",Torso)
- RA.Name = "Right Shoulder"
- RA.Part0 = Torso
- RA.C0 = cn(1.5, 0.5, 0)
- RA.C1 = cn(0, 0.5, 0)
- RA.Part1 = RARM
- local LA = Instance.new("Weld",Torso)
- LA.Name = "Left Shoulder"
- LA.Part0 = Torso
- LA.C0 = cn(-1.5, 0.5, 0)
- LA.C1 = cn(0, 0.5, 0)
- LA.Part1 = LARM
- LL.C0 = LHCF * cn(0,-1,1)*aa(rad(0),rad(0),rad(0))
- RL.C0 = RHCF * cn(0,-1,1)*aa(rad(0),rad(0),rad(0))
- local swait = function()
- game:GetService('RunService').Heartbeat:wait(0)
- end
- function CreateShake(RepeatedFor,OffsetDebounce)
- spawn(function()
- local Camera = g:GetService('Workspace').CurrentCamera
- for i=1,RepeatedFor do swait()
- Camera.CFrame = Camera.CFrame * CFrame.new(math.random()*OffsetDebounce,
- math.random()*OffsetDebounce,
- math.random()*OffsetDebounce)
- end
- end)
- end
- function RayCast(Position, Direction, Range, Ignore)
- local ht = g:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * Range), Ignore)
- return ht or nil
- end
- H:WaitForChild('Animator',true):Destroy()
- C:WaitForChild('Animate',true):Destroy() turn = false
- local jupei = true
- local time = 0
- plr.Chatted:Connect(function(message)
- if string.sub((message),1,6) == 'music ' then
- jupeimus.SoundId = 'rbxassetid://'.. string.sub((message),7)
- jupeimus:Play()
- elseif string.sub((message),1,4) == 'vol ' then
- jupeimus.Volume = string.sub((message),5)
- jupeimus:Play()
- elseif string.sub((message),1,4) == 'pos ' then
- time = string.sub((message),5)
- end
- end)
- attack = true
- H.JumpPower = 57
- H.WalkSpeed = 16
- jupeimus = Instance.new("Sound", Torso)
- jupeimus.Volume = 999999999
- jupeimus.Pitch = 1
- jupeimus.SoundId = "rbxassetid://692574039"
- jupeimus.TimePosition = 0
- jupeimus.Looped = true
- jupeimus.Name = "Dance"
- spawn(function()
- while true do swait()
- a=a+1
- end
- end)
- jupeimus.TimePosition = time
- jupeimus:Play()
- for i=0,1,0.05 do swait()
- RL.C0 = RL.C0:lerp(RHCF * cn(rad(0 * cos(a/25)),rad(0 * cos(a/25))-0.93,1)*aa(rad(0),rad(0),rad(0)+rad(-0.5*cos(a/25))),.0)
- LL.C0 = LL.C0:lerp(LHCF * cn(rad(1 * cos(a/40)),rad(5 * cos(a/25))-0.93,1)*aa(rad(-20),rad(0)+rad(-1.5*cos(a/25)),rad(0)+rad(0.5*cos(a/25))),.15)
- RA.C0 = RA.C0:lerp(cn(1.49, 0.55 - rad(-2 * cos(a/25)), 0.4) * aa(rad(0),rad(0),rad(0)),.0)
- LA.C0 = LA.C0:lerp(cn(-1.49, 1 - rad(-4 * cos(a/10)), 0) * aa(rad(182.5),rad(5),rad(-50)),.15)
- RootJ.C0 = RootJ.C0:lerp(RootCF *cn(rad(0),rad(0*cos(a/25)),-0.05)* cn(0, 0, rad(2 * cos(a/25))) * aa(rad(0)+rad(1.5 * cos(a/25)), rad(0), rad(0)), .0)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(NeckCF * aa(rad(0)+rad(-5 * sin(a/25)), rad(0), rad(0)), .0)
- end
Advertisement
Add Comment
Please, Sign In to add comment