Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat wait() until #game:GetService("Players"):GetPlayers() > 0
- local coms = {Instance.new("RemoteEvent",script),Instance.new("RemoteFunction",script)}
- local owner = owner or game:GetService("Players"):WaitForChild("plytalent")
- local FF = Instance.new("ForceField",owner.Character)
- local waitremote = Instance.new('RemoteEvent',script)
- local char = Instance.new('ObjectValue',script)
- char.Name = "CharacterObjectValue"
- function createFakeCharacter(DisplayName)
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- local Part3 = Instance.new("Part")
- local Part4 = Instance.new("Part")
- local Part5 = Instance.new("Part")
- local Part6 = Instance.new("Part")
- local Part7 = Instance.new("Part")
- local Humanoid8 = Instance.new("Humanoid")
- local Part9 = Instance.new("Part")
- local CharacterMesh10 = Instance.new("CharacterMesh")
- local Shirt11 = Instance.new("Shirt")
- local Pants12 = Instance.new("Pants")
- local Part13 = Instance.new("Part")
- local SpecialMesh14 = Instance.new("SpecialMesh")
- local AlignOrientation15 = Instance.new("AlignOrientation")
- local AlignPosition16 = Instance.new("AlignPosition")
- local Part17 = Instance.new("Part")
- local SpecialMesh18 = Instance.new("SpecialMesh")
- local AlignOrientation19 = Instance.new("AlignOrientation")
- local AlignPosition20 = Instance.new("AlignPosition")
- local Attachment21 = Instance.new("Attachment")
- local Attachment22 = Instance.new("Attachment")
- local Attachment23 = Instance.new("Attachment")
- Attachment21.Name = "Head"
- Attachment22.Name = "Hair"
- Attachment23.Name = "Mask"
- Attachment21.Parent = Part1
- Attachment22.Parent = Part17
- Attachment23.Parent = Part13
- Model0.Name = "Ghost"
- Model0.PrimaryPart = Part9
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-51.5, 4.5, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-51.5, 4.5, -53)
- Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part1.Size = Vector3.new(2, 1, 1)
- Part1.BrickColor = BrickColor.new("Institutional white")
- Part1.Material = Enum.Material.Sand
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Institutional white")
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh2.Parent = Part1
- SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
- Part3.Name = "Torso"
- Part3.Parent = Model0
- Part3.CFrame = CFrame.new(-51.5, 3, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part3.Position = Vector3.new(-51.5, 3, -53)
- Part3.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part3.Size = Vector3.new(2, 2, 1)
- Part3.BrickColor = BrickColor.new("Institutional white")
- Part3.LeftParamA = 0
- Part3.LeftParamB = 0
- Part3.LeftSurface = Enum.SurfaceType.Weld
- Part3.Material = Enum.Material.Sand
- Part3.RightParamA = 0
- Part3.RightParamB = 0
- Part3.RightSurface = Enum.SurfaceType.Weld
- Part3.brickColor = BrickColor.new("Institutional white")
- Part3.FormFactor = Enum.FormFactor.Symmetric
- Part3.formFactor = Enum.FormFactor.Symmetric
- Part4.Name = "Left Arm"
- Part4.Parent = Model0
- Part4.CFrame = CFrame.new(-53, 3, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.Position = Vector3.new(-53, 3, -53)
- Part4.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part4.Size = Vector3.new(1, 2, 1)
- Part4.BrickColor = BrickColor.new("Institutional white")
- Part4.CanCollide = false
- Part4.Material = Enum.Material.Sand
- Part4.brickColor = BrickColor.new("Institutional white")
- Part4.FormFactor = Enum.FormFactor.Symmetric
- Part4.formFactor = Enum.FormFactor.Symmetric
- Part5.Name = "Right Arm"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-50, 3, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part5.Position = Vector3.new(-50, 3, -53)
- Part5.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part5.Size = Vector3.new(1, 2, 1)
- Part5.BrickColor = BrickColor.new("Institutional white")
- Part5.CanCollide = false
- Part5.Material = Enum.Material.Sand
- Part5.brickColor = BrickColor.new("Institutional white")
- Part5.FormFactor = Enum.FormFactor.Symmetric
- Part5.formFactor = Enum.FormFactor.Symmetric
- Part6.Name = "Left Leg"
- Part6.Parent = Model0
- Part6.CFrame = CFrame.new(-52, 1, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part6.Position = Vector3.new(-52, 1, -53)
- Part6.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part6.Size = Vector3.new(1, 2, 1)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.BrickColor = BrickColor.new("Institutional white")
- Part6.CanCollide = false
- Part6.Material = Enum.Material.Sand
- Part6.brickColor = BrickColor.new("Institutional white")
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.formFactor = Enum.FormFactor.Symmetric
- Part7.Name = "Right Leg"
- Part7.Parent = Model0
- Part7.CFrame = CFrame.new(-51, 1, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part7.Position = Vector3.new(-51, 1, -53)
- Part7.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part7.Size = Vector3.new(1, 2, 1)
- Part7.BottomSurface = Enum.SurfaceType.Smooth
- Part7.BrickColor = BrickColor.new("Institutional white")
- Part7.CanCollide = false
- Part7.Material = Enum.Material.Sand
- Part7.brickColor = BrickColor.new("Institutional white")
- Part7.FormFactor = Enum.FormFactor.Symmetric
- Part7.formFactor = Enum.FormFactor.Symmetric
- Humanoid8.Parent = Model0
- Humanoid8.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- Humanoid8.HealthDisplayDistance = 0
- Humanoid8.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
- Humanoid8.LeftLeg = Part6
- Humanoid8.NameDisplayDistance = 0
- Humanoid8.RightLeg = Part7
- Humanoid8.Torso = Part9
- Part9.Name = "HumanoidRootPart"
- Part9.Parent = Model0
- Part9.CFrame = CFrame.new(-51.5, 3, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part9.Position = Vector3.new(-51.5, 3, -53)
- Part9.Transparency = 1
- Part9.Size = Vector3.new(2, 2, 1)
- Part9.Anchored = false
- Part9.BottomSurface = Enum.SurfaceType.Smooth
- Part9.CanCollide = false
- Part9.LeftParamA = 0
- Part9.LeftParamB = 0
- Part9.Material = Enum.Material.Sand
- Part9.RightParamA = 0
- Part9.RightParamB = 0
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part9.FormFactor = Enum.FormFactor.Symmetric
- Part9.formFactor = Enum.FormFactor.Symmetric
- CharacterMesh10.Parent = Model0
- CharacterMesh10.BodyPart = Enum.BodyPart.Torso
- CharacterMesh10.MeshId = "rbxassetid://48112070"
- Shirt11.Name = "Shirt"
- Shirt11.Parent = Model0
- Shirt11.ShirtTemplate = "http://www.roblox.com/asset/?id=1210857659"
- Pants12.Name = "Pants"
- Pants12.Parent = Model0
- Pants12.PantsTemplate = "http://www.roblox.com/asset/?id=1210858273"
- Part13.Name = "Mask"
- Part13.Parent = Model0
- Part13.CFrame = CFrame.new(-51.5017433, 4.50454998, -53.0024185, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part13.Position = Vector3.new(-51.50174331665, 4.5045499801636, -53.002418518066)
- Part13.Size = Vector3.new(2, 1, 1)
- Part13.BottomSurface = Enum.SurfaceType.Smooth
- Part13.CanCollide = false
- Part13.Material = Enum.Material.Sand
- Part13.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh14.Name = "SpecialMesh"
- SpecialMesh14.Parent = Part13
- SpecialMesh14.MeshId = "rbxassetid://5728632913"
- SpecialMesh14.TextureId = "http://www.roblox.com/asset/?id=4809181158"
- SpecialMesh14.MeshType = Enum.MeshType.FileMesh
- AlignOrientation15.Parent = Part13
- AlignOrientation15.Attachment0 = Attachment22
- AlignOrientation15.Attachment1 = Attachment21
- AlignOrientation15.RigidityEnabled = true
- AlignPosition16.Parent = Part13
- AlignPosition16.Attachment0 = Attachment22
- AlignPosition16.Attachment1 = Attachment21
- AlignPosition16.RigidityEnabled = true
- Part17.Name = "Hair"
- Part17.Parent = Model0
- Part17.CFrame = CFrame.new(-51.5, 4.5, -53, 1, 9.8568377e-15, -8.08289872e-16, -9.82961152e-15, 0.999588966, 0.0286718253, 1.09057112e-15, -0.0286718253, 0.999588966)
- Part17.Orientation = Vector3.new(-1.6399999856949, 0, 0)
- Part17.Position = Vector3.new(-51.5, 4.5, -53)
- Part17.Rotation = Vector3.new(-1.6399999856949, 0, 0)
- Part17.Size = Vector3.new(2, 1, 1)
- Part17.BottomSurface = Enum.SurfaceType.Smooth
- Part17.CanCollide = false
- Part17.Material = Enum.Material.Sand
- Part17.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh18.Name = "SpecialMesh"
- SpecialMesh18.Parent = Part17
- SpecialMesh18.MeshId = "rbxassetid://6521980205"
- SpecialMesh18.Offset = Vector3.new(0, -0.80000001192093, 0.20000000298023)
- SpecialMesh18.Scale = Vector3.new(0.94999998807907, 0.95999997854233, 0.91000002622604)
- SpecialMesh18.TextureId = "http://www.roblox.com/asset/?id=6517665515"
- SpecialMesh18.MeshType = Enum.MeshType.FileMesh
- AlignOrientation19.Parent = Part17
- AlignOrientation19.Attachment0 = Attachment23
- AlignOrientation19.Attachment1 = Attachment21
- AlignOrientation19.RigidityEnabled = true
- AlignPosition20.Parent = Part17
- AlignPosition20.Attachment0 = Attachment23
- AlignPosition20.Attachment1 = Attachment21
- AlignPosition20.RigidityEnabled = true
- return Model0
- end
- local mainchar = createFakeCharacter(owner.DisplayName)
- local conchar = mainchar:Clone()
- FF.Visible = false
- local comsfuncs={
- function(plr, partname, partposition, partsize, partorientation)
- if plr ~= owner then
- return
- end
- if owner.Character.Parent then
- owner.Character.Parent = nil
- end
- if not conchar then
- conchar = mainchar:Clone()
- conchar.Parent = workspace
- return
- end
- if not conchar.Parent then
- conchar=nil
- return
- end
- if FF.Parent ~= owner.Character then
- FF = Instance.new("ForceField",owner.Character)
- FF.Visible = false
- end
- conchar.Name = "Ghost"
- local part = conchar:FindFirstChild(partname)
- if not part then
- conchar:Destroy()
- conchar = nil
- return
- end
- if conchar and char.Value ~= conchar then
- char.Value = conchar
- end
- if part then
- if not part:FindFirstChild("PartAlignPos") then
- part.Position = partposition
- local AlignPosition = Instance.new("AlignPosition",part)
- local AlignOrientation = Instance.new("AlignOrientation",part)
- AlignPosition.Name = "PartAlignPos"
- AlignOrientation.Name = "PartAlignOri"
- local attachment0 = Instance.new("Attachment",part)
- local attachment1 = Instance.new("Attachment",part)
- attachment1.Name = "attachment1"
- AlignOrientation.RigidityEnabled = true
- AlignPosition.RigidityEnabled = true
- AlignOrientation.Attachment0 = attachment0
- AlignOrientation.Attachment1 = attachment1
- AlignPosition.Attachment0 = attachment0
- AlignPosition.Attachment1 = attachment1
- end
- if partname == "HumanoidRootPart" then
- part.Transparency = 1
- else
- part.Transparency = 0.5
- end
- part.Name = partname
- if part:GetNetworkOwner() ~= owner then
- part:SetNetworkOwner(owner)
- end
- end
- end,
- function(plr)
- if plr ~= owner then
- return
- end
- return conchar
- end
- }
- coms[1].Name = "Com1"
- coms[2].Name = "Com2"
- waitremote.Name = "WaitRemote"
- coms[2].OnServerInvoke = comsfuncs[2]
- coms[1].OnServerEvent:Connect(comsfuncs[1])
- NLS([==[
- local remote=script.Parent.Com1
- local com1 = script.Parent.Com2
- local owner = owner or game:GetService("Players").LocalPlayer
- game:GetService("RunService").RenderStepped:Connect(function()
- if owner.Character.Parent ~= workspace then
- owner.Character.Parent = workspace
- end
- end)
- local parttable={}
- local FF
- game:GetService("RunService").Stepped:Connect(function()
- if not FF then
- FF = Instance.new("ForceField")
- end
- if not FF.Parent then
- FF = nil
- end
- if FF then
- FF.Visible = false
- end
- for _, part in pairs(owner.Character:GetChildren()) do
- coroutine.resume(coroutine.create(function()
- local part = part
- if part:IsA("BasePart") then
- remote:FireServer(part.Name, part.Position, part.Size, part.Orientation)
- end
- end))
- end
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- if com1:InvokeServer() then
- for _,part in pairs(com1:InvokeServer():GetDescendants()) do
- coroutine.resume(coroutine.create(function()
- if part:IsA("BasePart") then
- part.CanCollide = false
- if part:FindFirstChild("attachment1") then
- part.attachment1.Parent = owner.Character[part.Name]
- part.Position = owner.Character[part.Name].Position
- end
- elseif part:IsA("Humanoid") then
- part:Destroy()
- end
- end))
- end
- end
- end)
- script.Parent.WaitRemote:FireServer()
- ]==],script)
- game:GetService("RunService").Heartbeat:Connect(function()
- for i=1,#coms do
- if not coms[i].Parent then
- local ClassName = coms[i].ClassName
- coms[i] = Instance.new(ClassName,script)
- if ClassName == "RemoteEvent" then
- coms[i].OnServerEvent:Connect(comsfuncs[i])
- elseif ClassName == "RemoteFunction" then
- coms[i].OnServerInvoke = comsfuncs[i]
- end
- end
- if coms[i].Name ~= "Com" .. tostring(i) then
- coms[i].Name = "Com" .. tostring(i)
- end
- end
- end)
- script.Parent = owner.PlayerGui
- print("waiting")
- waitremote.OnServerEvent:Wait()
- print("Destroy! wait remote")
- waitremote:Destroy()
- owner.Character.Parent = nil
- local rolandscript=NS([===[
- local waitingremote = Instance.new("RemoteEvent",script)
- waitingremote.Name = "waitremote"
- function creategun()
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- local Weld3 = Instance.new("Weld")
- local Part4 = Instance.new("Part")
- local Part5 = Instance.new("Part")
- local Weld6 = Instance.new("Weld")
- Model0.Name = "GunModel"
- Model0.PrimaryPart = Part1
- Part1.Name = "gun"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-36.0459862, 2.68512678, 5.4637394, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-36.045986175537, 2.6851267814636, 5.4637393951416)
- Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part1.Size = Vector3.new(0.20847088098526, 0.94680535793304, 6.3699998855591)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Really black")
- Part1.CanCollide = false
- Part1.Locked = true
- Part1.Reflectance = -100
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Really black")
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "rbxassetid://7515835851"
- SpecialMesh2.Scale = Vector3.new(0.45717298984528, 0.4571730196476, 0.45717298984528)
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Weld3.Name = "Bullet"
- Weld3.Parent = Part1
- Weld3.C0 = CFrame.new(0, 0.313477516, -3.12394595, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld3.Part0 = Part1
- Weld3.Part1 = Part4
- Weld3.part1 = Part4
- Part4.Name = "Bullet"
- Part4.Parent = Model0
- Part4.CFrame = CFrame.new(-36.0459862, 2.9986043, 2.33979344, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.Position = Vector3.new(-36.045986175537, 2.9986042976379, 2.3397934436798)
- Part4.Size = Vector3.new(0.10000000149012, 0.10000000149012, 0.10000000149012)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.CanCollide = false
- Part4.Locked = true
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part5.Name = "Handle"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-36.0605736, 3.12793541, 7.73314953, 1, 0, 0, 0, 0.464352816, -0.885652781, 0, 0.885652781, 0.464352816)
- Part5.Orientation = Vector3.new(62.330001831055, 0, 0)
- Part5.Position = Vector3.new(-36.060573577881, 3.1279354095459, 7.7331495285034)
- Part5.Rotation = Vector3.new(62.330001831055, 0, 0)
- Part5.Size = Vector3.new(1, 2, 1)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.CanCollide = false
- Part5.Locked = true
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Weld6.Name = "gun"
- Weld6.Parent = Part5
- Weld6.C0 = CFrame.new(0.0725860596, -2.21551895, -0.661629438, 1, 0, 0, 0, 0.464352816, 0.885652781, 0, -0.885652781, 0.464352816)
- Weld6.C1 = CFrame.new(0.0580000021, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld6.Part0 = Part5
- Weld6.Part1 = Part1
- Weld6.part1 = Part1
- return Model0
- end
- function creategun2()
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local Part2 = Instance.new("Part")
- local SpecialMesh3 = Instance.new("SpecialMesh")
- local Weld4 = Instance.new("Weld")
- local Part5 = Instance.new("Part")
- local Weld6 = Instance.new("Weld")
- Model0.Name = "Gun"
- Model0.PrimaryPart = Part2
- Part1.Name = "Handle"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-56.3740005, 3.78794551, 7.83799982, 1, 3.82137432e-15, -8.74228334e-08, -3.82137093e-15, 1.00000095, 3.34075197e-22, 8.74227837e-08, 1.26217745e-28, 1.00000072)
- Part1.Position = Vector3.new(-56.374000549316, 3.7879455089569, 7.8379998207092)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(1, 2, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part2.Name = "Gun"
- Part2.Parent = Model0
- Part2.CFrame = CFrame.new(-56.3740005, 2.14700007, 7.55256653, -1, 8.74227624e-08, -3.82137093e-15, 3.82137093e-15, 0, -1, -8.74227766e-08, -0.999999881, -3.34074869e-22)
- Part2.Orientation = Vector3.new(90, 180, 0)
- Part2.Position = Vector3.new(-56.374000549316, 2.1470000743866, 7.5525665283203)
- Part2.Rotation = Vector3.new(90, 0, -180)
- Part2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part2.Size = Vector3.new(0.37797310948372, 0.94999998807907, 2.6956248283386)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.BrickColor = BrickColor.new("Really black")
- Part2.Reflectance = -1000
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.brickColor = BrickColor.new("Really black")
- Part2.CanCollide = false
- SpecialMesh3.Parent = Part2
- SpecialMesh3.MeshId = "rbxassetid://7523374921"
- SpecialMesh3.Scale = Vector3.new(0.38372907042503, 0.38372913002968, 0.38372910022736)
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- Weld4.Name = "Handle"
- Weld4.Parent = Part2
- Weld4.C0 = CFrame.new(0, -0.285433292, -1.64094543, -1, 4.23516474e-22, 0, -7.10542736e-15, 3.34075096e-22, -1.00000083, -2.92057526e-29, -1.00000095, -3.34075197e-22)
- Weld4.Part0 = Part2
- Weld4.Part1 = Part1
- Weld4.part1 = Part1
- Part5.Name = "Bullet"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-56.3740005, 0.811995029, 7.22424364, 1, 0, 2.13162821e-14, 0, 1, 0, 2.13162821e-14, 0, 0.999999762)
- Part5.Position = Vector3.new(-56.374000549316, 0.81199502944946, 7.2242436408997)
- Part5.Transparency = 1
- Part5.Size = Vector3.new(0.10000000149012, 0.10000000149012, 0.10000000149012)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.CanCollide = false
- Weld6.Name = "Part"
- Weld6.Parent = Part5
- Weld6.C0 = CFrame.new(0, 1.33500504, 0.328322887, -1, 8.74227624e-08, -3.82137093e-15, 3.82137093e-15, 0, -1, -8.74227766e-08, -0.999999881, -3.34074869e-22)
- Weld6.Part0 = Part5
- Weld6.Part1 = Part2
- Weld6.part1 = Part2
- return Model0
- end
- function createsword()
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local ParticleEmitter2 = Instance.new("ParticleEmitter")
- local Part3 = Instance.new("Part")
- local Weld4 = Instance.new("Weld")
- local Part5 = Instance.new("Part")
- local Weld6 = Instance.new("Weld")
- local SpecialMesh7 = Instance.new("SpecialMesh")
- Model0.Name = "Main"
- Model0.PrimaryPart = Part1
- Part1.Name = "Hitbox"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-65.1884003, 2.34880948, 29.0725231, 1, 0, 0, 0, 1, 4.37113883e-08, 0, -4.37113883e-08, 1)
- Part1.Position = Vector3.new(-65.188400268555, 2.3488094806671, 29.072523117065)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(0.0010000000474975, 0.6583531498909, 11.325116157532)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.TopSurface = Enum.SurfaceType.Smooth
- ParticleEmitter2.Parent = Part1
- ParticleEmitter2.Speed = NumberRange.new(0, 0)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(0, 0, 0),Color3.new(0.117647, 0.117647, 0.117647))
- ParticleEmitter2.LightInfluence = 1
- ParticleEmitter2.Texture = "rbxassetid://603193846"
- ParticleEmitter2.Transparency = NumberSequence.new(0,1)
- ParticleEmitter2.ZOffset = 1
- ParticleEmitter2.Size = NumberSequence.new(0.3125,0)
- ParticleEmitter2.Acceleration = Vector3.new(0, 5, 0)
- ParticleEmitter2.EmissionDirection = Enum.NormalId.Back
- ParticleEmitter2.Lifetime = NumberRange.new(0.75, 1)
- ParticleEmitter2.Rate = 3000
- Part3.Name = "Handle"
- Part3.Parent = Model0
- Part3.CFrame = CFrame.new(-65.2248993, 3.1950767, 37.3521118, 1, 0, 0, 0, 0.985921264, -0.167210802, 0, 0.167210802, 0.985921264)
- Part3.Orientation = Vector3.new(9.6300001144409, 0, 0)
- Part3.Position = Vector3.new(-65.224899291992, 3.1950767040253, 37.352111816406)
- Part3.Rotation = Vector3.new(9.6300001144409, 0, 0)
- Part3.Transparency = 1
- Part3.Size = Vector3.new(1, 2, 1)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.CanCollide = false
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Weld4.Name = "Sword"
- Weld4.Parent = Part3
- Weld4.C0 = CFrame.new(0.0368614197, -0.65113759, -6.00376034, 1, 0, 0, 0, 0, 1, 0, -1, 0)
- Weld4.C1 = CFrame.new(0, 0, 1.20799994, 1, 0, 0, 0, 0.985921264, -0.167210847, 0, 0.167210847, 0.985921264)
- Weld4.Part0 = Part3
- Weld4.Part1 = Part5
- Weld4.part1 = Part5
- Part5.Name = "Sword"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-65.1880417, 2.34899998, 31.3239994, 1, 0, 0, 0, -4.37113883e-08, 1, 0, -1, -4.37113883e-08)
- Part5.Orientation = Vector3.new(-90, 0, 0)
- Part5.Position = Vector3.new(-65.188041687012, 2.3489999771118, 31.323999404907)
- Part5.Rotation = Vector3.new(-90, 0, 0)
- Part5.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part5.Size = Vector3.new(0.67699998617172, 15.430000305176, 1.5319999456406)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.BrickColor = BrickColor.new("Really black")
- Part5.CanCollide = false
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.brickColor = BrickColor.new("Really black")
- Weld6.Name = "Hitbox"
- Weld6.Parent = Part5
- Weld6.C0 = CFrame.new(-0.000358581543, 2.25147676, -0.000190496445, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Weld6.Part0 = Part5
- Weld6.Part1 = Part1
- Weld6.part1 = Part1
- SpecialMesh7.Parent = Part5
- SpecialMesh7.MeshId = "rbxassetid://7513632006"
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- return Model0
- end
- function createsword2()
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local Weld2 = Instance.new("Weld")
- local Part3 = Instance.new("Part")
- local SpecialMesh4 = Instance.new("SpecialMesh")
- local Weld5 = Instance.new("Weld")
- local Weld6 = Instance.new("Weld")
- local Weld7 = Instance.new("Weld")
- local Weld8 = Instance.new("Weld")
- local Part9 = Instance.new("Part")
- local Part10 = Instance.new("Part")
- local Part11 = Instance.new("Part")
- local Part12 = Instance.new("Part")
- Model0.Name = "Sword2"
- Model0.PrimaryPart = Part1
- Part1.Name = "Handle"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-57.4780884, 3.45233488, 9.50007629, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-57.478088378906, 3.4523348808289, 9.5000762939453)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(1, 2, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.Locked = true
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Weld2.Name = "Sword"
- Weld2.Parent = Part1
- Weld2.C0 = CFrame.new(-0.111911774, -0.549632311, -4.20755672, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
- Weld2.Part0 = Part1
- Weld2.Part1 = Part3
- Weld2.part1 = Part3
- Part3.Name = "Sword"
- Part3.Parent = Model0
- Part3.CFrame = CFrame.new(-57.5900002, 2.90270257, 5.29251957, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
- Part3.Orientation = Vector3.new(0, 180, 0)
- Part3.Position = Vector3.new(-57.590000152588, 2.9027025699615, 5.292519569397)
- Part3.Rotation = Vector3.new(-180, 0, -180)
- Part3.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part3.Size = Vector3.new(0.3568326830864, 1.1743521690369, 11.178980827332)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Really black")
- Part3.CanCollide = false
- Part3.Locked = true
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.brickColor = BrickColor.new("Really black")
- SpecialMesh4.Parent = Part3
- SpecialMesh4.MeshId = "rbxassetid://7527652353"
- SpecialMesh4.Scale = Vector3.new(0.53258603811264, 0.53258603811264, 0.53258603811264)
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- Weld5.Name = "Hitbox0"
- Weld5.Parent = Part3
- Weld5.C0 = CFrame.new(0.00191879272, 0.087678194, 5.09866619, -1, -4.63827234e-08, -7.41038804e-08, 0, 0.847649574, -0.5305565, 8.74227766e-08, -0.5305565, -0.847649574)
- Weld5.Part0 = Part3
- Weld5.Part1 = Part10
- Weld5.part1 = Part10
- Weld6.Name = "Hitbox1"
- Weld6.Parent = Part3
- Weld6.C0 = CFrame.new(0.0409698486, -0.228977919, 1.76255965, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1)
- Weld6.Part0 = Part3
- Weld6.Part1 = Part9
- Weld6.part1 = Part9
- Weld7.Name = "Hitbox2"
- Weld7.Parent = Part3
- Weld7.C0 = CFrame.new(0.0409698486, -0.346400023, -2.01896858, -1, 3.68905511e-08, -7.92580224e-08, 0, 0.906606138, 0.421978712, 8.74227766e-08, 0.421978712, -0.906606138)
- Weld7.Part0 = Part3
- Weld7.Part1 = Part12
- Weld7.part1 = Part12
- Weld8.Name = "Hitbox3"
- Weld8.Parent = Part3
- Weld8.C0 = CFrame.new(0.0409698486, -0.32441926, -1.37172031, -1, -1.94975538e-08, -8.52208188e-08, 0, 0.974812508, -0.223026022, 8.74227766e-08, -0.223026022, -0.974812508)
- Weld8.Part0 = Part3
- Weld8.Part1 = Part11
- Weld8.part1 = Part11
- Part9.Name = "Hitbox1"
- Part9.Parent = Model0
- Part9.CFrame = CFrame.new(-57.63097, 2.67372465, 3.52995992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part9.Position = Vector3.new(-57.630970001221, 2.6737246513367, 3.5299599170685)
- Part9.Transparency = 1
- Part9.Size = Vector3.new(0.14361953735352, 0.11858534812927, 5.6687269210815)
- Part9.BottomSurface = Enum.SurfaceType.Smooth
- Part9.CanCollide = false
- Part9.Locked = true
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part10.Name = "Hitbox0"
- Part10.Parent = Model0
- Part10.CFrame = CFrame.new(-57.5919189, 2.99038076, 0.193853378, 1, 0, 0, 0, 0.847649574, -0.5305565, 0, 0.5305565, 0.847649574)
- Part10.Orientation = Vector3.new(32.040000915527, 0, 0)
- Part10.Position = Vector3.new(-57.591918945313, 2.9903807640076, 0.1938533782959)
- Part10.Rotation = Vector3.new(32.040000915527, 0, 0)
- Part10.Transparency = 1
- Part10.Size = Vector3.new(0.13296127319336, 0.11858534812927, 1.2458262443542)
- Part10.BottomSurface = Enum.SurfaceType.Smooth
- Part10.CanCollide = false
- Part10.Locked = true
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Part11.Name = "Hitbox3"
- Part11.Parent = Model0
- Part11.CFrame = CFrame.new(-57.63097, 2.57828331, 6.66423988, 1, 0, 0, 0, 0.974812508, -0.223026022, 0, 0.223026022, 0.974812508)
- Part11.Orientation = Vector3.new(12.890000343323, 0, 0)
- Part11.Position = Vector3.new(-57.630970001221, 2.5782833099365, 6.6642398834229)
- Part11.Rotation = Vector3.new(12.890000343323, 0, 0)
- Part11.Transparency = 1
- Part11.Size = Vector3.new(0.14361953735352, 0.11858534812927, 0.9631462097168)
- Part11.BottomSurface = Enum.SurfaceType.Smooth
- Part11.CanCollide = false
- Part11.Locked = true
- Part11.TopSurface = Enum.SurfaceType.Smooth
- Part12.Name = "Hitbox2"
- Part12.Parent = Model0
- Part12.CFrame = CFrame.new(-57.63097, 2.55630255, 7.31148815, 1, 0, 0, 0, 0.906606138, 0.421978712, 0, -0.421978712, 0.906606138)
- Part12.Orientation = Vector3.new(-24.959999084473, 0, 0)
- Part12.Position = Vector3.new(-57.630970001221, 2.5563025474548, 7.3114881515503)
- Part12.Rotation = Vector3.new(-24.959999084473, 0, 0)
- Part12.Transparency = 1
- Part12.Size = Vector3.new(0.14361953735352, 0.11858534812927, 0.46920847892761)
- Part12.BottomSurface = Enum.SurfaceType.Smooth
- Part12.CanCollide = false
- Part12.Locked = true
- Part12.TopSurface = Enum.SurfaceType.Smooth
- return Model0
- end
- local swordmodel = createsword()
- local Player = owner or game:GetService("Players"):WaitForChild("plytalent")
- local char = script.Parent.CharacterObjectValue
- local weldweapon = Instance.new("Weld",char:WaitForChild("Right Arm"))
- local facemodel = createface()
- local weldface = Instance.new("Weld",char:WaitForChild("Head"))
- local gunmodel = creategun()
- local weldgun = Instance.new("Weld",char:WaitForChild("Right Arm"))
- local dualweld_folder = Instance.new("Folder",char)
- local gunright = creategun2()
- local gunleft = creategun2()
- local weldright_hand = Instance.new("Weld",char:WaitForChild("Right Arm"))
- local weldleft_hand = Instance.new("Weld",char:WaitForChild("Left Arm"))
- local swordright = createsword2()
- local swordleft = createsword2()
- local weldright_handsword = Instance.new("Weld",char:WaitForChild("Right Arm"))
- local weldleft_handsword = Instance.new("Weld",char:WaitForChild("Left Arm"))
- weldweapon.Part0 = weldweapon.Parent
- weldweapon.Part1 = swordmodel.Handle
- swordmodel.Parent = char
- facemodel.Parent = char
- weldface.Part0 = weldface.Parent
- weldface.Part1 = facemodel.Head
- gunmodel.Parent = char
- weldgun.Part0 = weldgun.Parent
- weldgun.Part1 = gunmodel.Handle
- dualweld_folder.Name = "Dual_Welded_Gun"
- gunright.Parent = char
- gunleft.Parent = char
- weldright_hand.Part0 = weldright_hand.Parent
- weldright_hand.Part1 = gunright.Handle
- weldleft_hand.Part0 = weldleft_hand.Parent
- weldleft_hand.Part1 = gunleft.Handle
- swordright.Parent = char
- swordleft.Parent = char
- weldright_handsword.Part0 = weldright_handsword.Parent
- weldright_handsword.Part1 = swordright.Handle
- weldleft_handsword.Part0 = weldleft_handsword.Parent
- weldleft_handsword.Part1 = swordleft.Handle
- local weaponlist={
- ["Dual_Weld_Gun"]={gunleft,gunright},
- ["Gun"] = {gunmodel},
- ["Dual_Weld_Sword"] = {swordright,swordleft}
- }
- for _,models in pairs(weaponlist) do
- for _,model in pairs(models) do
- spawn(function()
- for _,v in pairs(model:GetDescendants()) do
- if v:IsA("BasePart")then
- v.Transparency = 1
- elseif v:IsA("ParticleEmitter") then
- v.Enabled = false
- end
- end
- end)
- end
- end
- weaponlist["Sword"] = {swordmodel}
- local mode = "Sword"
- local lastswitch = mode
- function switchweapon_f()
- for _,model in pairs(weaponlist[lastswitch]) do
- spawn(function()
- for i=0,1,1/60 do
- for _,v in pairs(model:GetDescendants()) do
- if v:IsA("BasePart") and v.Name ~= "Handle" and not v.Name:find("Hitbox") and v.Name ~= "Bullet"then
- if v.Transparency < i then
- v.Transparency = i
- end
- wait(1/60)
- elseif v:IsA("ParticleEmitter") then
- v.Enabled = false
- end
- end
- end
- end)
- end
- for _,model in pairs(weaponlist[mode]) do
- spawn(function()
- for i=1,0,-1/60 do
- for _,v in pairs(model:GetDescendants()) do
- if v:IsA("BasePart") and v.Name ~= "Handle" and not v.Name:find("Hitbox") and v.Name ~= "Bullet"then
- v.Transparency = i
- wait(1/60)
- elseif v:IsA("ParticleEmitter") then
- v.Enabled = true
- end
- end
- end
- end)
- end
- end
- switchweapon_f(mode)
- local attack = false
- function create_homing_script_f(parent,type)
- local scstring = [==[
- local part = script.Parent
- local BodyGyro = Instance.new("BodyGyro",part)
- local BodyPosition = Instance.new("BodyPosition",part)
- part.Anchored = false
- function moveTo(target)
- local dir = (target.Position - part.Position).unit
- BodyGyro.cframe = CFrame.new(Vector3.new(0,0,0), dir)
- BodyGyro.D = 100
- BodyGyro.maxTorque = Vector3.new(1000000, 1000000, 1000000)
- BodyPosition.position = target.Position
- BodyPosition.D = 100
- BodyPosition.maxForce = Vector3.new(1000000, 1000000, 1000000)
- end
- function findNearestTorso(pos)
- local nearest = {
- torso = nil,
- distance = math.huge
- }
- for _, object in ipairs(game:GetService("Players"):GetPlayers()) do
- if object and object ~= owner then
- if object.Character then
- local torso = object.Character:FindFirstChild("HumanoidRootPart")
- local human = object.Character:FindFirstChildOfClass("Humanoid")
- if torso and human and human.Health > 0 then
- local this = {
- torso = torso,
- distance = (torso.Position - pos).magnitude
- }
- if this.distance < nearest.distance then
- nearest = this
- end
- end
- end
- end
- end
- return nearest.torso, nearest.distance
- end
- local debris=game:GetService("Debris")]==]
- if type == "Heal" then
- scstring = scstring.. [==[
- function damage(PartParent,hit)
- if PartParent then
- if game:GetService("Players"):FindFirstChild(PartParent.Name) and PartParent.Name ~= "plytalent" and PartParent.Name ~= "FacelessOne" and PartParent.Name ~= "Mami Tomoe Armor" and PartParent.Name ~= "NekoBeast" then
- if part.Anchored then
- return
- end
- part.Anchored = true
- part.Position = hit.Position
- game:GetService("Players"):FindFirstChild(PartParent.Name).Character.Archivable = true
- local fake = game:GetService("Players"):FindFirstChild(PartParent.Name).Character:Clone()
- game:GetService("Players"):FindFirstChild(PartParent.Name).Character.Archivable = false
- if PartParent:FindFirstChildOfClass("Humanoid") then
- PartParent:FindFirstChildOfClass("Humanoid").Health = PartParent:FindFirstChildOfClass("Humanoid").MaxHealth
- if fake then
- for _,partfake in pairs(fake:GetChildren())do
- if partfake:IsA("BasePart")then
- partfake.Anchored = true
- spawn(function()
- for i=0,1,1/60 do
- partfake.Transparency = i
- wait(1/60)
- end
- end)
- partfake.Color = Color3.new(0,1,0)
- partfake.CanCollide = false
- else
- partfake:Destroy()
- end
- end
- fake.Parent = workspace
- debris:AddItem(fake,2)
- end
- for i =0 , 1 , 0.01 do
- part.Transparency = i
- wait(0.01)
- end
- cleanup()
- end
- end
- end
- end
- ]==]
- elseif type == "Damage" then
- scstring = scstring.. [==[
- function damage(PartParent,hit)
- if PartParent then
- if game:GetService("Players"):FindFirstChild(PartParent.Name) and PartParent.Name ~= "plytalent" and PartParent.Name ~= "FacelessOne" and PartParent.Name ~= "Mami Tomoe Armor" and PartParent.Name ~= "NekoBeast" then
- if part.Anchored then
- return
- end
- part.Anchored = true
- part.Position = hit.Position
- game:GetService("Players"):FindFirstChild(PartParent.Name).Character.Archivable = true
- local fake = game:GetService("Players"):FindFirstChild(PartParent.Name).Character:Clone()
- game:GetService("Players"):FindFirstChild(PartParent.Name).Character.Archivable = false
- if PartParent:FindFirstChildOfClass("Humanoid") then
- PartParent:FindFirstChildOfClass("Humanoid").Health = PartParent:FindFirstChildOfClass("Humanoid").Health - 10
- if fake then
- for _,partfake in pairs(fake:GetChildren())do
- if partfake:IsA("BasePart")then
- partfake.Anchored = true
- spawn(function()
- for i=0,1,1/60 do
- partfake.Transparency = i
- wait(1/60)
- end
- end)
- partfake.Color = Color3.new(1,0,0)
- partfake.CanCollide = false
- else
- partfake:Destroy()
- end
- end
- fake.Parent = workspace
- debris:AddItem(fake,2)
- end
- for i =0 , 1 , 0.01 do
- part.Transparency = i
- wait(0.01)
- end
- cleanup()
- end
- end
- end
- end
- ]==]
- end
- scstring = scstring..[==[
- Homing=game:GetService("RunService").Stepped:Connect(function()
- local torso,far = findNearestTorso(part.Position)
- if torso ~= nil then
- moveTo(torso)
- end
- end)
- touch=part.Touched:Connect(function(hit)
- damage(hit.Parent,hit)
- end)
- function cleanup()
- print("Disconnecting Event")
- part:Destroy()
- Homing:Disconnect()
- touch:Disconnect()
- script:Destroy()
- end]==]
- return NS(scstring,parent)
- end
- function teleport(plr,where)
- if plr ~= Player then
- return
- end
- char:SetPrimaryPartCFrame(where*CFrame.new(0,3.5,0))
- end
- local Dual_Weld_Gun_combo = 0
- local damagetype = "Heal"
- local Remote_Animation = Instance.new("RemoteFunction",script)
- Remote_Animation.Name= "Animation"
- waitingremote:FireClient(owner)
- waitingremote.OnServerEvent:Wait()
- waitingremotew:Destroy()
- function runAnimation(name)
- return Remote_Animation:InvokeClient(name)
- end
- function attack_f(plr)
- if plr ~= Player or attack then
- return
- end
- print("CheckMode:",mode)
- attack = true
- if mode == "Gun" then
- runAnimation("Gun1_AttackPhase1")
- local clone = Instance.new("Part")
- clone.Size = Vector3.new(0.1,0.1,0.1)
- clone.Color = Color3.new(0,1,0)
- clone.Parent = workspace
- clone.CFrame = gunmodel.Bullet.CFrame
- create_homing_script_f(clone,damagetype)
- runAnimation("Gun1_AttackPhase2")
- elseif mode == "Dual_Weld_Gun" then
- runAnimation("Gun1_AttackPhase1")
- local clone = Instance.new("Part")
- clone.Size = Vector3.new(0.1,0.1,0.1)
- clone.Color = Color3.new(0,1,0)
- clone.Parent = workspace
- clone.CFrame = gunleft.Bullet.CFrame
- create_homing_script_f(clone,damagetype)
- runAnimation("Gun1_AttackPhase2")
- runAnimation("Gun1_AttackPhase3")
- local clone = Instance.new("Part")
- clone.Size = Vector3.new(0.1,0.1,0.1)
- clone.Color = Color3.new(0,1,0)
- clone.Parent = workspace
- clone.CFrame = gunright.Bullet.CFrame
- create_homing_script_f(clone,damagetype)
- runAnimation("Gun1_AttackPhase4")
- end
- attack = false
- end
- function switch_f(plr,key)
- if plr ~= Player then
- return
- end
- local switched = false
- if mode ~= lastswitch then
- lastswitch = mode
- end
- if key == "q" and mode ~= "Sword" then
- mode = "Sword"
- switched = true
- elseif key == "e" and mode ~= "Gun" then
- mode = "Gun"
- switched = true
- elseif key == "r" and mode ~= "Dual_Weld_Gun" then
- mode = "Dual_Weld_Gun"
- switched = true
- elseif key == "t" and mode ~= "Dual_Weld_Sword" then
- mode = "Dual_Weld_Sword"
- switched = true
- elseif key == "f" and damagetype == "Damage" then
- damagetype = "Heal"
- print("Damage Mode:",damagetype)
- elseif key == "f" and damagetype == "Heal" then
- damagetype = "Damage"
- print("Damage Mode:",damagetype)
- end
- if switched then
- switchweapon_f(mode)
- print("Current Mode:", mode)
- end
- end
- local music = Instance.new("Sound",char.HumanoidRootPart)
- music.SoundId = "rbxassetid://6659445380"
- music.Volume = 0.1
- music.Looped = true
- music:Play()
- local skill_folder = Instance.new("Folder",script)
- local switch_remote = Instance.new("RemoteEvent",skill_folder)
- local attack_remote = Instance.new("RemoteEvent",skill_folder)
- local teleport_remote = Instance.new("RemoteEvent",skill_folder)
- skill_folder.Name = "Skill_Folder"
- switch_remote.Name = "Switch"
- attack_remote.Name = "Attack"
- teleport_remote.Name = "Teleport"
- attack_remote.OnServerEvent:Connect(attack_f)
- switch_remote.OnServerEvent:Connect(switch_f)
- teleport_remote.OnServerEvent:Connect(teleport)
- ]===],script)
- rolandscript.Name = "Roland"
- local animationroland = NLS([=[
- local Player = owner or game:GetService("Players").LocalPlayer
- print("Waiting Animation Remote")
- script.Parent.waitremote.OnClientEvent:Wait()
- local Remote_Animation = script.Parent.Animation
- local Character = Player.Character
- local Torso = Character.Torso
- local Humanoid = Character.Humanoid
- local LeftArm = Character["Left Arm"]
- local LeftLeg = Character["Left Leg"]
- local RightArm = Character["Right Arm"]
- local RightLeg = Character["Right Leg"]
- local LS = Torso["Left Shoulder"]
- local LH = Torso["Left Hip"]
- local RS = Torso["Right Shoulder"]
- local RH = Torso["Right Hip"]
- local Neck = Torso.Neck
- local RootPart = Character.HumanoidRootPart
- local RootJoint = RootPart.RootJoint
- local cf = CFrame.new
- local angles = CFrame.Angles
- local ROOTC0 = RootJoint.C0
- local NECKC0 = Torso.Neck.C0
- local COS = math.cos
- local ACOS = math.acos
- local SIN = math.sin
- local ASIN = math.asin
- local ABS = math.abs
- local MRANDOM = math.random
- local FLOOR = math.floor
- local euler=CFrame.fromEulerAnglesXYZ
- local angles=CFrame.Angles
- RW, LW=Instance.new("Weld"), Instance.new("Weld")
- RW.Name="Right Shoulder" LW.Name="Left Shoulder"
- LH=Torso["Left Hip"]
- RH=Torso["Right Hip"]
- RootCF=euler(-1.57,0,3.14)
- necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- RSH=Character.Torso["Right Shoulder"]
- LSH=Character.Torso["Left Shoulder"]
- RSH.Parent=nil
- LSH.Parent=nil
- RW.Name="Right Shoulder"
- RW.Part0=Character.Torso
- RW.C0=cf(1.5, 0.5, 0)
- RW.C1=cf(0, 0.5, 0)
- RW.Part1=Character["Right Arm"]
- RW.Parent=Character.Torso
- LW.Name="Left Shoulder"
- LW.Part0=Character.Torso
- LW.C0=cf(-1.5, 0.5, 0)
- LW.C1=cf(0, 0.5, 0)
- LW.Part1=Character["Left Arm"]
- LW.Parent=Character.Torso
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = t-1
- finishInterp = t
- end
- end
- return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
- 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
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00-m11-m22+1)
- local recip = 0.5/s
- return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
- elseif i == 1 then
- local s = math.sqrt(m11-m22-m00+1)
- local recip = 0.5/s
- return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
- elseif i == 2 then
- local s = math.sqrt(m22-m00-m11+1)
- local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w*xs, w*ys, w*zs
- local xx = x*xs
- local xy = x*ys
- local xz = x*zs
- local yy = y*ys
- local yz = y*zs
- local zz = z*zs
- return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
- end
- local function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CFrame.new(
- at.x, at.y, at.z,
- right.x, top.x, back.x,
- right.y, top.y, back.y,
- right.z, top.z, back.z
- )
- end
- function rayCast(Pos, Dir, Max, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or math.huge)), Ignore)
- end
- local destroy_animate = true
- local currentsine = 0
- function attackanimation(animation_name)
- if animation_name == "Gun1_AttackPhase1" then
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(0)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(60 - 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(0)),i)
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- elseif animation_name == "Gun1_AttackPhase2" then
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(0)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(80 - 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(0)),i)
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- elseif animation_name == "Gun2_AttackPhase1" then
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(45)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(-45)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(90 - 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(45)),i)
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- elseif animation_name == "Gun2_AttackPhase2" then
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(45)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(-45)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(110 - 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(45)),i)
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- elseif animation_name == "Gun2_AttackPhase3" then
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(-45)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(45)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(90 + 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(-45)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- elseif animation_name == "Gun2_AttackPhase4" then
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(-45)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(45)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(110 + 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(-45)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- return "Complete"
- end
- Remote_Animation.OnClientInvoke = attackanimation
- function animation(sine)
- if not attack then
- local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
- local hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
- if hitfloor then
- if Character:FindFirstChild("Animate") and destroy_animate then
- destroy_animate=false
- wait(1)
- Character:FindFirstChild("Animate"):Destroy()
- end
- end
- if RootPart.Velocity.y > 1 and hitfloor==nil then
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine/25))*angles(math.rad(-10),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
- RW.C0=Clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-5),math.rad(0),math.rad(25)),.1)
- LW.C0=Clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-5),math.rad(0),math.rad(-25)),.1)
- elseif RootPart.Velocity.y < -1 and hitfloor==nil then
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine/25))*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- RW.C0=Clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-20),math.rad(0),math.rad(50)),.1)
- LW.C0=Clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-20),math.rad(0),math.rad(-50)),.1)
- elseif torvel<1 and hitfloor~=nil then
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 28))*angles(math.rad(0 - 1 * math.cos(sine / 34)),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(22.5 - 2.5 * math.cos(sine / 28)),math.rad(0),math.rad(0)),.1)
- if mode == "Dual_Weld_Gun" or mode == "Sword" then
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- else
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- end
- if mode == "Sword" then
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(75 - 1 * math.cos(sine / 8)),math.rad(0),math.rad(20)),.1)
- else
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- end
- elseif torvel>2 and hitfloor~=nil then
- RH.C0=Clerp(RH.C0,cf(1,-0.85,-0.15 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 25 * math.cos(sine / 8))),.1)
- LH.C0=Clerp(LH.C0,cf(-1,-0.85,-0.15 + 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 25 * math.cos(sine / 8))),.1)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,-0.15 - 0.1 * math.cos(sine / 4))*angles(math.rad(5),math.rad(0),math.rad(0 - 5 * math.cos(sine / 8))),.1)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(10 + 2.5 * math.cos(sine / 100)),math.rad(0),math.rad(0 + 5 * math.cos(sine / 8))),.1)
- if mode == "Dual_Weld_Gun" or mode == "Sword" then
- RW.C0=Clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 10 * math.cos(sine / 8)),math.rad(0),math.rad(10 - 10 * math.cos(sine / 4))),.1)
- else
- RW.C0=Clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 45 * math.cos(sine / 8)),math.rad(0),math.rad(10 - 10 * math.cos(sine / 4))),.1)
- end
- if mode == "Dual_Weld_Gun" then
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 10 * math.cos(sine / 8)),math.rad(0),math.rad(-10 + 10 * math.cos(sine / 4))),.1)
- else
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 45 * math.cos(sine / 8)),math.rad(0),math.rad(-10 + 10 * math.cos(sine / 4))),.1)
- end
- end
- end
- end
- game:GetService("RunService").RenderStepped:Connect(function(delta)
- currentsine = currentsine + (25*delta)
- animation(currentsine)
- end)
- ]=],rolandscript)
- animationroland.Name = "Animation"
- local keybind = NLS([=[
- local player = owner or game:GetService("Players").LocalPlayer
- local keylist={
- ["Teleport"] = {"n"},
- ["Switch"] = {"q","e","r","t","f"}
- }
- local needargs = {
- ["Teleport"] = "Hit",
- ["Switch"] = "Key",
- ["Attack"] = "Hit"
- }
- local mouse = player:GetMouse()
- mouse.Button1Down:Connect(function()
- if script.Parent:FindFirstChild("Skill_Folder") then
- if script.Parent.Skill_Folder:FindFirstChild("Attack") then
- print("Fired Remote Attack")
- script.Parent.Skill_Folder:FindFirstChild("Attack"):FireServer()
- end
- end
- end)
- mouse.KeyDown:Connect(function(k)
- for index, keybinds in pairs(keylist) do
- for i=1,#keybinds do
- if keybinds[i] == k then
- if script.Parent:FindFirstChild("Skill_Folder") then
- if script.Parent.Skill_Folder:FindFirstChild(index) then
- local args = needargs[index]
- if args == "Key" then
- args = k
- else
- args = mouse[args]
- end
- script.Parent.Skill_Folder:FindFirstChild(index):FireServer(args)
- end
- end
- end
- end
- end
- end)
- ]=],rolandscript)
- keybind.Name = "KeyBinds"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement