Advertisement
iiFlamez

Untitled

Oct 12th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.73 KB | None | 0 0
  1. -- params : ...
  2.  
  3. p = game.Players.LocalPlayer
  4. c = p.Character
  5. local m = p:GetMouse()
  6. local cam = workspace.CurrentCamera
  7. local input, debris, ChatService = game:GetService("UserInputService"), game:GetService("Debris"), game:GetService("Chat")
  8. local starterGui = game:GetService("StarterGui")
  9. local papercams = 0
  10. local stalk = nil
  11. local limbs = {"Head", "UpperTorso", "LowerTorso", "RightUpperArm", "RightLowerArm", "RightHand", "LeftUpperArm", "LeftLowerArm", "LeftHand", "RightUpperLeg", "RightLowerLeg", "RightFoot", "LeftUpperLeg", "LeftLowerLeg", "LeftFoot"}
  12. starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
  13. starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
  14. starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
  15. local billboard = require(script:WaitForChild("Billboard"))
  16. local ability = require(script:WaitForChild("Ability"))
  17. billboard.Make(c)
  18. game:GetService("RunService").RenderStepped:connect(function()
  19. if stalk ~= nil then
  20. cam.CFrame = CFrame.new(c.HumanoidRootPart.Position, stalk.Position) * CFrame.new(2.5, 5, 15)
  21. end
  22. end)
  23. game.ReplicatedStorage.ServerMessage.OnClientEvent:connect(function(msg, color)
  24. game.StarterGui:SetCore("ChatMakeSystemMessage", {Text = tostring(msg), Color = color})
  25. end)
  26. game.ReplicatedStorage.DisablePlayer.OnClientEvent:connect(function(switch)
  27. p.PlayerScripts.ControlScript.Disabled = switch
  28. do
  29. if switch == true and not c:FindFirstChild("Controlled") then
  30. local bool = Instance.new("BoolValue")
  31. bool.Parent = c
  32. bool.Name = "Controlled"
  33. end
  34. if switch == false and c:FindFirstChild("Controlled") then
  35. c:FindFirstChild("Controlled"):Destroy()
  36. end
  37. if switch == true then
  38. starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
  39. else
  40. if switch == false then
  41. starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
  42. end
  43. end
  44. end
  45. end)
  46. game.ReplicatedStorage.Gyo.OnClientEvent:connect(function(...)
  47. local args = {...}
  48. if args[1] == "add" then
  49. p.CameraMinZoomDistance = 0
  50. p.CameraMaxZoomDistance = 0
  51. for _,v in pairs(args[2]) do
  52. do
  53. local mod = Instance.new("Model")
  54. do
  55. mod.Parent = cam
  56. mod.Name = v.Name .. "Parts"
  57. for _,b in pairs(limbs) do
  58. do
  59. local connect = v:FindFirstChild(b).Changed:connect(function(prop)
  60. if prop == "Transparency" and v:FindFirstChild(b)[prop] == 0 then
  61. mod:Destroy()
  62. end
  63. end)
  64. local part = Instance.new("Part)
  65. part.Parent = mod
  66. part.Anchored = false
  67. part.CanCollide = false
  68. part.Size = v:FindFirstChild(b).Size
  69. part.Transparency = 0
  70. part.CFrame = v:FindFirstChild(b).CFrame
  71. local W = Instance.new("Weld")
  72. W.Parent = part
  73. W.Part0 = part
  74. W.Part1 = v:FindFirstChild(b)
  75. end
  76. end
  77. end
  78. end
  79. end
  80. else
  81. do
  82. if args[1] == "remove" then
  83. for _,v in pairs(cam:GetChildren()) do
  84. v:Destroy()
  85. end
  86. p.CameraMaxZoomDistance = 15
  87. p.CameraMinZoomDistance = 5
  88. end
  89. end
  90. end
  91. end)
  92. game.ReplicatedStorage.Ability.OnClientEvent:connect(function(...)
  93. local args = {...}
  94. ability[args[1]](p, c, args[2][1], args[2][2], args[2][3])
  95. end)
  96. c:WaitForChild("FireKeyDown, 30).OnClientEvent:connect(function(switch, object)
  97. for _,v in pairs(c:GetChildren()) do
  98. if v.Name == "PaperCamera" then
  99. papercams = papercams + 1
  100. end
  101. end
  102. if switch == "off" then
  103. cam.CameraSubject = c.Humanoid
  104. else
  105. if switch == "on" then
  106. cam.CameraSubject = object
  107. end
  108. end
  109. end)
  110. c.Mouse.OnClientInvoke = function(player, name)
  111. return m.Hit
  112. end
  113.  
  114. input.InputBegan:connect(function(inputObject, gameProcessed)
  115. if not gameProcessed and not c:FindFirstChild("Paralyze") and not c:FindFirstChild("Caged") and not c:FindFirstChild("Controlled") then
  116. if inputObject.UserInputType == Enum.UserInputType.Keyboard then
  117. local mouse = m.Hit
  118. c:WaitForChild("FireKeyDown"):FireServer(c, inputObject.KeyCode, m.Hit)
  119. if inputObject.KeyCode == Enum.KeyCode.N then
  120. if m.Target.Parent:FindFirstChildOfClass("Humanoid") then
  121. cam.CameraType = Enum.CameraType.Scriptable
  122. stalk = m.Target.Parent.HumanoidRootPart
  123. else
  124. cam.CFrame = CFrame.new(0, 0, 0)
  125. cam.CameraType = Enum.CameraType.Custom
  126. stalk = nil
  127. end
  128. end
  129. else
  130. do
  131. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 and (m.Target == nil or not m.Target:FindFirstChild("ClickDetector")) then
  132. oldnow = tick()
  133. end
  134. end
  135. end
  136. end
  137. end)
  138. input.InputEnded:connect(function(inputObject, gameProcessed)
  139. if not gameProcessed and not c:FindFirstChild("Paralyze") and not c:FindFirstChild("Caged") and not c:FindFirstChild("Controlled") then
  140. if inputObject.UserInputType == Enum.UserInputType.Keyboard then
  141. c:WaitForChild("FireKeyUp"):FireServer(c, inputObject.KeyCode)
  142. if (inputObject.KeyCode == Enum.KeyCode.LeftControl or inputObject.KeyCode == Enum.KeyCode.LeftAlt) and p.PlayerGui:WaitForChild("gameUI"):FindFirstChild("Tooltip") then
  143. p.PlayerGui:WaitForChild("gameUI"):FindFirstChild("Tooltip"):Destroy()
  144. end
  145. else
  146. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 and (m.Target == nil or not m.Target:FindFirstChild("ClickDetector")) then
  147. if oldnow == nil then
  148. oldnow = tick()
  149. end
  150. local mouse = m.Hit
  151. local timedown = math.floor(tick() - oldnow)
  152. c:WaitForChild("FireMouseUp"):FireServer(c, timedown, mouse)
  153. end
  154. end
  155. end
  156. end)
  157. input.TouchStarted:connect(function(inputObject, gameProcessed)
  158. 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
  159. oldnow = tick()
  160. end
  161. end)
  162. input.TouchEnded:connect(function(inputObject, gameProcessed)
  163. 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
  164. if oldnow == nil then
  165. oldnow = tick()
  166. end
  167. local mouse = m.Hit
  168. local timedown = math.floor(tick() - oldnow)
  169. c:WaitForChild("FireMouseUp"):FireServer(c, timedown, mouse)
  170. end
  171. end)
  172. playerui = p.PlayerGui:WaitForChild("gameUI)
  173. local on1, on2, on3, on4 = false, false, false, false
  174. playerui:WaitForChild("NenWindow"):WaitForChild("BaseWindow").MeditateButton.MouseButton1Down:connect(function()
  175. c.UiControl:FireServer("Nen")
  176. end)
  177. playerui:WaitForChild("NenWindow):WaitForChild("RestButton).MouseButton1Down:connect(function()
  178. c.UiControl:FireServer("Stamina")
  179. end)
  180. playerui:WaitForChild("Hud):WaitForChild("Skill1).InputBegan:connect(function(inputObject, gameProcessed)
  181. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then
  182. if not on1 then
  183. c:WaitForChild("FireKeyDown"):FireServer(c, playerui.Hud.Skill1.Key.Text, m.Hit)
  184. on1 = true
  185. else
  186. if on1 then
  187. c:WaitForChild("FireKeyUp"):FireServer(c, playerui.Hud.Skill1.Key.Text)
  188. on1 = false
  189. end
  190. end
  191. end
  192. end)
  193. playerui:WaitForChild("Hud):WaitForChild("Skill2).InputBegan:connect(function(inputObject, gameProcessed)
  194. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then
  195. if not on2 then
  196. c:WaitForChild("FireKeyDown"):FireServer(c, playerui.Hud.Skill2.Key.Text, m.Hit)
  197. on2 = true
  198. else
  199. if on2 then
  200. c:WaitForChild("FireKeyUp"):FireServer(c, playerui.Hud.Skill2.Key.Text)
  201. on2 = false
  202. end
  203. end
  204. end
  205. end)
  206. playerui:WaitForChild("Hud):WaitForChild("Skill3).InputBegan:connect(function(inputObject, gameProcessed)
  207. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then
  208. if not on3 then
  209. c:WaitForChild("FireKeyDown"):FireServer(c, playerui.Hud.Skill3.Key.Text, m.Hit)
  210. on3 = true
  211. else
  212. if on3 then
  213. c:WaitForChild("FireKeyUp"):FireServer(c, playerui.Hud.Skill3.Key.Text)
  214. on3 = false
  215. end
  216. end
  217. end
  218. end)
  219. playerui:WaitForChild("Hud):WaitForChild("Skill4).InputBegan:connect(function(inputObject, gameProcessed)
  220. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 or inputObject.UserInputType == Enum.UserInputType.Touch then
  221. if not on4 then
  222. c:WaitForChild("FireKeyDown"):FireServer(c, playerui.Hud.Skill4.Key.Text, m.Hit)
  223. on4 = true
  224. else
  225. if on4 then
  226. c:WaitForChild("FireKeyUp"):FireServer(c, playerui.Hud.Skill4.Key.Text)
  227. on4 = false
  228. end
  229. end
  230. end
  231. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement