Advertisement
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 = owner
- local Mouse,mouse,UserInputService,ContextActionService
- do
- script.Parent = Player.Character
- local CAS = {Actions={}}
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.Parent = Player.Character
- local fakeEvent = function()
- local t = {_fakeEvent=true}
- t.Connect = function(self,f)self.Function=f end
- t.connect = t.Connect
- return t
- end
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- function CAS:BindAction(name,fun,touch,...)
- CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
- end
- function CAS:UnbindAction(name)
- CAS.Actions[name] = nil
- end
- 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
- elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
- if io.UserInputState == Enum.UserInputState.Begin then
- m:TrigEvent("Button1Down")
- else
- m:TrigEvent("Button1Up")
- end
- else
- for n,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
- if io.UserInputState == Enum.UserInputState.Begin then
- m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
- UIS:TrigEvent("InputBegan",io,false)
- else
- m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent("InputEnded",io,false)
- end
- end
- end)
- NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Char = Player.Character
- local Event = Char:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- local io = {KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
- Event:FireServer(io)
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Changed = false
- local Mouse = Player:GetMouse()
- local h,t = Mouse.Hit,Mouse.Target
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- Event:FireServer({isMouse=true,Target=Mouse.Target,Hit=Mouse.Hit})
- h,t=Mouse.Hit,Mouse.Target
- end
- end
- ]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- local Player = owner
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- local loaded = false
- local LeftArm = Character["Left Arm"]
- local RightArm = Character["Right Arm"]
- local LeftLeg = Character["Left Leg"]
- local RightLeg = Character["Right Leg"]
- local Head = Character.Head
- local Torso = Character.Torso
- local Camera = game.Workspace.CurrentCamera
- local RootPart = Character.HumanoidRootPart
- local RootJoint = RootPart.RootJoint
- local attack = false
- local Anim = 'Idle'
- local attacktype = 1
- local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- local velocity = RootPart.Velocity.y
- local sine = 0
- local change = 1
- local oml = false
- local Equipped = false
- local hide = false
- local Gender = 1 --Triggered
- local Create = LoadLibrary("RbxUtility").Create
- Character.Humanoid.MaxHealth = math.huge
- Character.Humanoid.Health = math.huge
- local toggleTag = true
- local bilguit = Instance.new("BillboardGui", hed)
- bilguit.Adornee = nil
- bilguit.Name = "ModeName"
- bilguit.Size = UDim2.new(4, 0, 1.2, 0)
- bilguit.StudsOffset = Vector3.new(-8, 8/1.5, 0)
- local modet = Instance.new("TextLabel", bilguit)
- modet.Size = UDim2.new(10/2, 0, 7/2, 0)
- modet.FontSize = "Size8"
- modet.TextScaled = true
- modet.TextTransparency = 0
- modet.BackgroundTransparency = 1
- modet.TextTransparency = 0
- modet.TextStrokeTransparency = 0
- modet.Font = "Antique"
- modet.TextStrokeColor3 = Color3.new(1,0,0)
- modet.TextColor3 = Color3.new(0.25,0,0)
- modet.Text = "Do not disturb G_osty is editing or scripting a script"
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- stick = New("Model",Torso,"stick",{})
- Handle = New("Part",stick,"Handle",{BrickColor = BrickColor.new("Institutional white"),Material = Enum.Material.SmoothPlastic,Transparency = 1,Transparency = 1,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = CFrame.new(-52.3997879, -1.08457458, -63.8579559, -1, -5.30103321e-08, 1.31363009e-07, 5.19570165e-09, -0.940442502, -0.339954078, 1.41560349e-07, -0.339954227, 0.940441906),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.972549, 0.972549, 0.972549),})
- moter = New("Motor",Handle,"mot",{Part0 = Handle,Part1 = Torso,})
- local newMotor = function(part0, part1, c0, c1)
- local w = Create('Motor'){
- Parent = part0,
- Part0 = part0,
- Part1 = part1,
- C0 = c0,
- C1 = c1,
- }
- return w
- end
- function clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5/s
- return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
- local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
- local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
- local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
- local rarmc1 = RW.C1
- local larmc1 = LW.C1
- local rlegc1 = RH.C1
- local llegc1 = LH.C1
- local resetc1 = false
- function PlayAnimationFromTable(table, speed, bool)
- RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
- RW.C0 = clerp(RW.C0, table[3], speed)
- LW.C0 = clerp(LW.C0, table[4], speed)
- RH.C0 = clerp(RH.C0, table[5], speed)
- LH.C0 = clerp(LH.C0, table[6], speed)
- if bool == true then
- if resetc1 == false then
- resetc1 = true
- RootJoint.C1 = RootJoint.C1
- Torso.Neck.C1 = Torso.Neck.C1
- RW.C1 = rarmc1
- LW.C1 = larmc1
- RH.C1 = rlegc1
- LH.C1 = llegc1
- end
- end
- end
- ArtificialHB = Create("BindableEvent", script){
- Parent = script,
- Name = "Heartbeat",
- }
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- function RemoveOutlines(part)
- part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
- end
- loaded = true
- function Sit2()
- attack = true
- Humanoid.WalkSpeed = 0
- Humanoid.JumpPower = 0
- sit = true
- repeat
- swait()
- PlayAnimationFromTable({
- CFrame.new(-0.0790518373, -1.28211284, -0.364974797, 1, -9.19981517e-07, 1.01839339e-06, 4.712426e-07, 0.927110493, 0.374788225, -1.28896136e-06, -0.374788225, 0.927110493) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
- CFrame.new(0.0790522769, 1.41239452, 0.0392460488, 1, 9.46696446e-07, -9.93475055e-07, -9.19947979e-07, 0.999646187, 0.0265871882, 1.01829437e-06, -0.0265878141, 0.999649346) * CFrame.new(0, 0, 0 - .05 * math.cos(sine/40)) * CFrame.Angles(math.rad(0 - 5 * math.cos(sine/40)), 0, 0),
- CFrame.new(1.09309757, 0.19830294, -0.861271143, 0.76847899, 0.336144269, 0.544469535, 0.239813626, 0.637579441, -0.732107878, -0.593236446, 0.693180799, 0.409354448) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
- CFrame.new(-0.881041527, 0.313548326, -0.857817411, 0.679015219, -0.402120054, -0.614196837, -0.27513656, 0.636264682, -0.720740676, 0.68061614, 0.658381879, 0.321395457) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
- CFrame.new(0.735003531, -0.977018833, -1.17779481, 0.989697278, -0.143176422, -4.26077889e-07, -0.0562922768, -0.389113575, -0.919468403, 0.131646067, 0.909995139, -0.393164426) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
- CFrame.new(-0.620305955, -0.990102291, -1.11360347, 0.980935276, 0.194335416, -1.13580725e-07, 0.0785024986, -0.396252751, -0.914779246, -0.177774101, 0.897339165, -0.403954059) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
- }, .1, false)
- moter.C0 = clerp(moter.C0, CFrame.new(0.023572728, -0.897642493, -0.694501638, -0.998318791, -0.0538648441, 0.0214428138, -4.82425094e-07, -0.36984843, -0.92909205, 0.0579760745, -0.927529037, 0.369226247) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 0.3)
- until attack == true
- end
- if loaded == true then
- Sit2()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement