Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- params : ...
- p = game.Players.LocalPlayer
- c = p.Character
- local m = p:GetMouse()
- local cam = workspace.CurrentCamera
- local input, debris, ChatService = game:GetService("UserInputService"), game:GetService("Debris"), game:GetService("Chat")
- local starterGui = game:GetService("StarterGui")
- local papercams = 0
- local stalk = nil
- local limbs = {"Head", "UpperTorso", "LowerTorso", "RightUpperArm", "RightLowerArm", "RightHand", "LeftUpperArm", "LeftLowerArm", "LeftHand", "RightUpperLeg", "RightLowerLeg", "RightFoot", "LeftUpperLeg", "LeftLowerLeg", "LeftFoot"}
- starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
- starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
- starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
- local billboard = require(script:WaitForChild("Billboard"))
- local ability = require(script:WaitForChild("Ability"))
- billboard.Make(c)
- game:GetService("RunService").RenderStepped:connect(function()
- if stalk ~= nil then
- cam.CFrame = CFrame.new(c.HumanoidRootPart.Position, stalk.Position) * CFrame.new(2.5, 5, 15)
- end
- end)
- game.ReplicatedStorage.ServerMessage.OnClientEvent:connect(function(msg, color)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {Text = tostring(msg), Color = color})
- end)
- game.ReplicatedStorage.DisablePlayer.OnClientEvent:connect(function(switch)
- p.PlayerScripts.ControlScript.Disabled = switch
- do
- if switch == true and not c:FindFirstChild("Controlled") then
- local bool = Instance.new("BoolValue")
- bool.Parent = c
- bool.Name = "Controlled"
- end
- if switch == false and c:FindFirstChild("Controlled") then
- c:FindFirstChild("Controlled"):Destroy()
- end
- if switch == true then
- starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
- else
- if switch == false then
- starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
- end
- end
- end
- end)
- game.ReplicatedStorage.Gyo.OnClientEvent:connect(function(...)
- local args = {...}
- if args[1] == "add" then
- p.CameraMinZoomDistance = 0
- p.CameraMaxZoomDistance = 0
- for _,v in pairs(args[2]) do
- do
- local mod = Instance.new("Model")
- do
- mod.Parent = cam
- mod.Name = v.Name .. "Parts"
- for _,b in pairs(limbs) do
- do
- local connect = v:FindFirstChild(b).Changed:connect(function(prop)
- if prop == "Transparency" and v:FindFirstChild(b)[prop] == 0 then
- mod:Destroy()
- end
- end)
- local part = Instance.new("Part)
- part.Parent = mod
- part.Anchored = false
- part.CanCollide = false
- part.Size = v:FindFirstChild(b).Size
- part.Transparency = 0
- part.CFrame = v:FindFirstChild(b).CFrame
- local W = Instance.new("Weld")
- W.Parent = part
- W.Part0 = part
- W.Part1 = v:FindFirstChild(b)
- end
- end
- end
- end
- end
- else
- do
- if args[1] == "remove" then
- for _,v in pairs(cam:GetChildren()) do
- v:Destroy()
- end
- p.CameraMaxZoomDistance = 15
- p.CameraMinZoomDistance = 5
- end
- end
- end
- end)
- game.ReplicatedStorage.Ability.OnClientEvent:connect(function(...)
- local args = {...}
- ability[args[1]](p, c, args[2][1], args[2][2], args[2][3])
- end)
- c:WaitForChild("FireKeyDown, 30).OnClientEvent:connect(function(switch, object)
- for _,v in pairs(c:GetChildren()) do
- if v.Name == "PaperCamera" then
- papercams = papercams + 1
- end
- end
- if switch == "off" then
- cam.CameraSubject = c.Humanoid
- else
- if switch == "on" then
- cam.CameraSubject = object
- end
- end
- end)
- c.Mouse.OnClientInvoke = function(player, name)
- return m.Hit
- end
- input.InputBegan:connect(function(inputObject, gameProcessed)
- if not gameProcessed and not c:FindFirstChild("Paralyze") and not c:FindFirstChild("Caged") and not c:FindFirstChild("Controlled") then
- if inputObject.UserInputType == Enum.UserInputType.Keyboard then
- local mouse = m.Hit
- c:WaitForChild("FireKeyDown"):FireServer(c, inputObject.KeyCode, m.Hit)
- if inputObject.KeyCode == Enum.KeyCode.N then
- if m.Target.Parent:FindFirstChildOfClass("Humanoid") then
- cam.CameraType = Enum.CameraType.Scriptable
- stalk = m.Target.Parent.HumanoidRootPart
- else
- cam.CFrame = CFrame.new(0, 0, 0)
- cam.CameraType = Enum.CameraType.Custom
- stalk = nil
- end
- end
- else
- do
- if inputObject.UserInputType == Enum.UserInputType.MouseButton1 and (m.Target == nil or not m.Target:FindFirstChild("ClickDetector")) then
- oldnow = tick()
- end
- end
- end
- end
- end)
- input.InputEnded:connect(function(inputObject, gameProcessed)
- if not gameProcessed and not c:FindFirstChild("Paralyze") and not c:FindFirstChild("Caged") and not c:FindFirstChild("Controlled") then
- if inputObject.UserInputType == Enum.UserInputType.Keyboard then
- c:WaitForChild("FireKeyUp"):FireServer(c, inputObject.KeyCode)
- if (inputObject.KeyCode == Enum.KeyCode.LeftControl or inputObject.KeyCode == Enum.KeyCode.LeftAlt) and p.PlayerGui:WaitForChild("gameUI"):FindFirstChild("Tooltip") then
- p.PlayerGui:WaitForChild("gameUI"):FindFirstChild("Tooltip"):Destroy()
- end
- else
- if inputObject.UserInputType == Enum.UserInputType.MouseButton1 and (m.Target == nil or not m.Target:FindFirstChild("ClickDetector")) then
- if oldnow == nil then
- oldnow = tick()
- end
- local mouse = m.Hit
- local timedown = math.floor(tick() - oldnow)
- c:WaitForChild("FireMouseUp"):FireServer(c, timedown, mouse)
- end
- end
- end
- end)
- input.TouchStarted:connect(function(inputObject, gameProcessed)
- if not gameProcessed and not c:FindFirstChild("workoutMode") and not c:FindFirstChild("Paralyze") and not c:FindFirstChild("Caged") and not c:FindFirstChild("Flight") and not c:FindFirstChild("Relax") and not c:FindFirstChild("Controlled") and (m.Target == nil or not m.Target:FindFirstChild("ClickDetector")) then
- oldnow = tick()
- end
- end)
- input.TouchEnded:connect(function(inputObject, gameProcessed)
- if not gameProcessed and not c:FindFirstChild("workoutMode") and not c:FindFirstChild("Paralyze") and not c:FindFirstChild("Caged") and not c:FindFirstChild("Flight") and not c:FindFirstChild("Relax") and not c:FindFirstChild("Controlled") and (m.Target == nil or not m.Target:FindFirstChild("ClickDetector")) then
- if oldnow == nil then
- oldnow = tick()
- end
- local mouse = m.Hit
- local timedown = math.floor(tick() - oldnow)
- c:WaitForChild("FireMouseUp"):FireServer(c, timedown, mouse)
- end
- end)
- playerui = p.PlayerGui:WaitForChild("gameUI)
- local on1, on2, on3, on4 = false, false, false, false
- playerui:WaitForChild("NenWindow"):WaitForChild("BaseWindow").MeditateButton.MouseButton1Down:connect(function()
- c.UiControl:FireServer("Nen")
- end)
- playerui:WaitForChild("NenWindow):WaitForChild("RestButton).MouseButton1Down:connect(function()
- c.UiControl:FireServer("Stamina")
- end)
- playerui:WaitForChild("Hud):WaitForChild("Skill1).InputBegan:connect(function(inputObject, gameProcessed)
- if inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then
- if not on1 then
- c:WaitForChild("FireKeyDown"):FireServer(c, playerui.Hud.Skill1.Key.Text, m.Hit)
- on1 = true
- else
- if on1 then
- c:WaitForChild("FireKeyUp"):FireServer(c, playerui.Hud.Skill1.Key.Text)
- on1 = false
- end
- end
- end
- end)
- playerui:WaitForChild("Hud):WaitForChild("Skill2).InputBegan:connect(function(inputObject, gameProcessed)
- if inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then
- if not on2 then
- c:WaitForChild("FireKeyDown"):FireServer(c, playerui.Hud.Skill2.Key.Text, m.Hit)
- on2 = true
- else
- if on2 then
- c:WaitForChild("FireKeyUp"):FireServer(c, playerui.Hud.Skill2.Key.Text)
- on2 = false
- end
- end
- end
- end)
- playerui:WaitForChild("Hud):WaitForChild("Skill3).InputBegan:connect(function(inputObject, gameProcessed)
- if inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then
- if not on3 then
- c:WaitForChild("FireKeyDown"):FireServer(c, playerui.Hud.Skill3.Key.Text, m.Hit)
- on3 = true
- else
- if on3 then
- c:WaitForChild("FireKeyUp"):FireServer(c, playerui.Hud.Skill3.Key.Text)
- on3 = false
- end
- end
- end
- end)
- playerui:WaitForChild("Hud):WaitForChild("Skill4).InputBegan:connect(function(inputObject, gameProcessed)
- if inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then
- if not on4 then
- c:WaitForChild("FireKeyDown"):FireServer(c, playerui.Hud.Skill4.Key.Text, m.Hit)
- on4 = true
- else
- if on4 then
- c:WaitForChild("FireKeyUp"):FireServer(c, playerui.Hud.Skill4.Key.Text)
- on4 = false
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement