Advertisement
Animescapetower

works

Apr 4th, 2018
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.38 KB | None | 0 0
  1. random = {211179008,0}--add id by [,0] or [,12892312] put a music id in [,here]
  2.  
  3. vol2 = {1,2,3,4,5,6,7,8,9,10}-- add volume
  4. player = game:GetService("Players").LocalPlayer
  5.  
  6. randomizesound = random[math.random(1,#random)]
  7.  
  8. randomizevol = vol2[math.random(1,#vol2)]
  9.  
  10. mouse = player:GetMouse()
  11.  
  12.  
  13. mouse.KeyDown:connect(function(key)
  14. if key == "z" then
  15. sound = Instance.new("Sound")
  16.  
  17.  
  18. sound.Volume = 4
  19. sound.Pitch = 1
  20. sound.SoundId = "rbxassetid://"..randomizesound
  21. sound.Parent = player.Character.HumanoidRootPart
  22.  
  23.  
  24. elseif key == "x" then
  25.  
  26. sound.Volume = randomizevol
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. elseif key == "c" or "v" then-- no music or mute
  40. sound:Stop()
  41.  
  42.  
  43. else
  44.  
  45.  
  46. sound:Play()
  47.  
  48.  
  49.  
  50.  
  51.  
  52. end
  53. end)
  54.  
  55. fly = true
  56. ragdoll = true
  57.  
  58. if fly == true then
  59.  
  60.  
  61. wait(1)
  62. Character = game.Players.LocalPlayer.Character
  63. Camera = game.Workspace.CurrentCamera
  64. Mouse = game.Players.LocalPlayer:GetMouse()
  65. RArmJoint = Character.Torso:FindFirstChild("Right Shoulder")
  66. LArmJoint = Character.Torso:FindFirstChild("Left Shoulder")
  67. RHipJoint = Character.Torso:FindFirstChild("Right Hip")
  68. LHipJoint = Character.Torso:FindFirstChild("Left Hip")
  69. Tilt = 0
  70. TiltConvergence = 0
  71. Twist = 0
  72. TwistConvergence = 0
  73. Speed = 0.975
  74. SpeedConvergence = 0.975
  75. SD = 0.95
  76. Flat = Vector3.new(1, 0, 1)
  77. CurrentCameraLV = nil
  78. MinVelocity = -100
  79. HasReset = false
  80. Flying = false
  81.  
  82. function KeyPressed(Key)
  83. if Key == "d" then
  84. TwistConvergence = 1
  85. elseif Key == "a" then
  86. TwistConvergence = -1
  87. elseif Key == "w" then
  88. TiltConvergence = 1
  89. elseif Key == "s" then
  90. TiltConvergence = -1
  91. elseif Key == "f" then
  92. SD = 0.95
  93. SpeedConvergence = 0.66
  94. end
  95. print(3)
  96. end
  97.  
  98. function KeyUnpressed(Key)
  99. if Key == "d" or Key == "a" then
  100. TwistConvergence = 0
  101. elseif Key == "w" or Key == "s" then
  102. TiltConvergence = 0
  103. elseif Key == " f" then
  104. SD = 0.975
  105. SpeedConvergence = 1
  106. end
  107. print(4)
  108. end
  109.  
  110. Mouse.KeyDown:connect(KeyPressed)
  111. Mouse.KeyUp:connect(KeyUnpressed)
  112.  
  113. function ChangeWeld(Weld, C0, C1)
  114. Weld.C0, Weld.C1 = C0, C1
  115. end
  116.  
  117. function MakeRay(From, To)
  118. local Hit, Position = game.Workspace:FindPartOnRay(Ray.new(From, To - From), Character)
  119. return {Hit = Hit, Position = Position}
  120. end
  121.  
  122. while true do
  123. wait()
  124. Twist = (Twist * 31 + TwistConvergence) / 32
  125. Tilt = (Tilt * 31 + TiltConvergence) / 32
  126. Speed = (Speed * 15 + SpeedConvergence) / 16
  127. if Character.Torso.Velocity.y < MinVelocity and not Character.Humanoid.Sit then
  128. Character.Animate.Disabled = true
  129. VMag = math.sqrt(Character.Torso.Velocity.magnitude / 48)
  130. DMag = ((Character.Torso.CFrame * CFrame.Angles(1.57, 0, 0)).lookVector - Character.Torso.Velocity.unit).magnitude
  131. MinVelocity = -50
  132. HasReset = false
  133. Character.Humanoid.PlatformStand = true
  134. Raise = math.max(math.min(Character.Torso.Velocity.y / 800 - (DMag * VMag / 4), 1), -1)
  135. ChangeWeld(RArmJoint,
  136. CFrame.new(1.5, 0.5, 0) * CFrame.Angles(Raise, (math.random() * 0.2 - 0.1) * Raise, 2.355 / Speed - 1.57 - Twist / 1.5),
  137. CFrame.new(0, 0.5, 0))
  138. ChangeWeld(LArmJoint,
  139. CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(Raise, (math.random() * 0.2 - 0.1) * Raise, -2.355 / Speed + 1.57 - Twist / 1.5),
  140. CFrame.new(0, 0.5, 0))
  141. ChangeWeld(RHipJoint,
  142. CFrame.new(0.5, -1, 0) * CFrame.Angles(Raise, (math.random() * 0.2 - 0.1) * Raise, 1.046 / Speed - 0.698 - Twist / 1.5),
  143. CFrame.new(0, 1, 0))
  144. ChangeWeld(LHipJoint,
  145. CFrame.new(-0.5, -1, 0) * CFrame.Angles(Raise, (math.random() * 0.2 - 0.1) * Raise, -1.046 / Speed + 0.698 - Twist / 1.5),
  146. CFrame.new(0, 1, 0))
  147. CurrentCameraLV = (game.Workspace.CurrentCamera.CoordinateFrame.lookVector * Flat).unit
  148. Character.Torso.CFrame = CFrame.new(Character.Torso.Position, Character.Torso.Position + ((Character.Torso.CFrame * CFrame.Angles(1.57, 0, 0)).lookVector * Flat * 15 + CurrentCameraLV)/16) * CFrame.Angles(-Tilt - 1.57, Twist, 0)
  149. Character.Torso.Velocity = Character.Torso.Velocity*SD + CurrentCameraLV*Tilt*5 + Vector3.new(-CurrentCameraLV.z, 0, CurrentCameraLV.x)*Twist*5
  150. Character.Torso.RotVelocity = Vector3.new(0, 0, 0)
  151. elseif not HasReset then
  152. Character.Animate.Disabled = false
  153. MinVelocity = -100
  154. Character.Humanoid.PlatformStand = false
  155. RArmJoint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0)
  156. RArmJoint.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0)
  157. LArmJoint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0)
  158. LArmJoint.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0)
  159. RHipJoint.C0 = CFrame.new(0.5, -1, 0) * CFrame.Angles(0, math.pi/2, 0)
  160. RHipJoint.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0, math.pi/2, 0)
  161. LHipJoint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.Angles(0, -math.pi/2, 0)
  162. LHipJoint.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0, -math.pi/2, 0)
  163. HasReset = true
  164. end
  165. end
  166.  
  167. end
  168.  
  169. --[[ This may take time, use this script in your own scripts just to add a ragdoll whenever you die, works for only r6 people
  170.  
  171. ]]
  172.  
  173. if ragdoll == true then
  174. HUMANOID = game.Players.LocalPlayer.Character.Humanoid
  175. wait()
  176. if HUMANOID.RigType ~= Enum.HumanoidRigType.R6 then
  177. game.Debris:AddItem(script,1)
  178. else
  179. wait()
  180. function getAttachment0(attachmentName)
  181. for _,child in next,script.Parent:GetChildren() do
  182. local attachment = child:FindFirstChild(attachmentName)
  183. if attachment then
  184. return attachment
  185. end
  186. end
  187. end
  188. HUMANOID.Died:Connect(function(var)
  189. local removeHRP = true
  190. local head = HUMANOID.Parent.Head
  191. local leftarm = HUMANOID.Parent["Left Arm"]
  192. local leftleg = HUMANOID.Parent["Left Leg"]
  193. local rightleg = HUMANOID.Parent["Right Leg"]
  194. local rightarm = HUMANOID.Parent["Right Arm"]
  195. local torso = HUMANOID.Parent.Torso
  196. local root =HUMANOID.Parent.HumanoidRootPart
  197. if removeHRP == true then
  198. root:Destroy()
  199. end
  200. local rootA =Instance.new("Attachment")
  201. local HeadA = Instance.new("Attachment")
  202. local LeftArmA = Instance.new("Attachment")
  203. local LeftLegA = Instance.new("Attachment")
  204. local RightArmA = Instance.new("Attachment")
  205. local RightLegA = Instance.new("Attachment")
  206. local TorsoA = Instance.new("Attachment")
  207. local TorsoA1 = Instance.new("Attachment")
  208. local TorsoA2 = Instance.new("Attachment")
  209. local TorsoA3 = Instance.new("Attachment")
  210. local TorsoA4 = Instance.new("Attachment")
  211. local TorsoA5 = Instance.new("Attachment")
  212. function set1()
  213. HeadA.Name = "HeadA"
  214. HeadA.Parent = head
  215. HeadA.Position = Vector3.new(0, -0.5, 0)
  216. HeadA.Rotation = Vector3.new(0, 0, 0)
  217. HeadA.Axis = Vector3.new(1, 0, 0)
  218. HeadA.SecondaryAxis = Vector3.new(0, 1, 0)
  219. LeftArmA.Name = "LeftArmA"
  220. LeftArmA.Parent = leftarm
  221. LeftArmA.Position = Vector3.new(0.5, 1, 0)
  222. LeftArmA.Rotation = Vector3.new(0, 0, 0)
  223. LeftArmA.Axis = Vector3.new(1, 0, 0)
  224. LeftArmA.SecondaryAxis = Vector3.new(0, 1, 0)
  225. LeftLegA.Name = "LeftLegA"
  226. LeftLegA.Parent = leftleg
  227. LeftLegA.Position = Vector3.new(0, 1, 0)
  228. LeftLegA.Rotation = Vector3.new(0, 0, 0)
  229. LeftLegA.Axis = Vector3.new(1, 0, 0)
  230. LeftLegA.SecondaryAxis = Vector3.new(0, 1, 0)
  231. RightArmA.Name = "RightArmA"
  232. RightArmA.Parent = rightarm
  233. RightArmA.Position = Vector3.new(-0.5, 1, 0)
  234. RightArmA.Rotation = Vector3.new(0, 0, 0)
  235. RightArmA.Axis = Vector3.new(1, 0, 0)
  236. RightArmA.SecondaryAxis = Vector3.new(0, 1, 0)
  237. RightLegA.Name = "RightLegA"
  238. RightLegA.Parent = rightleg
  239. RightLegA.Position = Vector3.new(0, 1, 0)
  240. RightLegA.Rotation = Vector3.new(0, 0, 0)
  241. RightLegA.Axis = Vector3.new(1, 0, 0)
  242. RightLegA.SecondaryAxis = Vector3.new(0, 1, 0)
  243. rootA.Name= "rootA"
  244. rootA.Parent = root
  245. rootA.Position = Vector3.new(0, 0, 0)
  246. rootA.Rotation = Vector3.new(0, 90, 0)
  247. rootA.Axis = Vector3.new(0, 0, -1)
  248. rootA.SecondaryAxis = Vector3.new(0, 1, 0)
  249. end
  250. function set2()
  251. TorsoA.Name = "TorsoA"
  252. TorsoA.Parent = torso
  253. TorsoA.Position = Vector3.new(0.5, -1, 0)
  254. TorsoA.Rotation = Vector3.new(0, 0, 0)
  255. TorsoA.Axis = Vector3.new(1, 0, 0)
  256. TorsoA.SecondaryAxis = Vector3.new(0, 1, 0)
  257. TorsoA1.Name = "TorsoA1"
  258. TorsoA1.Parent = torso
  259. TorsoA1.Position = Vector3.new(-0.5, -1, 0)
  260. TorsoA1.Rotation = Vector3.new(0, 0, 0)
  261. TorsoA1.Axis = Vector3.new(1, 0, 0)
  262. TorsoA1.SecondaryAxis = Vector3.new(0, 1, 0)
  263. TorsoA2.Name = "TorsoA2"
  264. TorsoA2.Parent = torso
  265. TorsoA2.Position = Vector3.new(-1, 1, 0)
  266. TorsoA2.Rotation = Vector3.new(0, 0, 0)
  267. TorsoA2.Axis = Vector3.new(1, 0, 0)
  268. TorsoA2.SecondaryAxis = Vector3.new(0, 1, 0)
  269. TorsoA3.Name = "TorsoA3"
  270. TorsoA3.Parent = torso
  271. TorsoA3.Position = Vector3.new(1, 1, 0)
  272. TorsoA3.Rotation = Vector3.new(0, 0, 0)
  273. TorsoA3.Axis = Vector3.new(1, 0, 0)
  274. TorsoA3.SecondaryAxis = Vector3.new(0, 1, 0)
  275. TorsoA4.Name = "TorsoA4"
  276. TorsoA4.Parent = torso
  277. TorsoA4.Position = Vector3.new(0, 1, 0)
  278. TorsoA4.Rotation = Vector3.new(0, 0, 0)
  279. TorsoA4.Axis = Vector3.new(1, 0, 0)
  280. TorsoA4.SecondaryAxis = Vector3.new(0, 1, 0)
  281. TorsoA5.Name = "TorsoA5"
  282. TorsoA5.Parent = torso
  283. TorsoA5.Position = Vector3.new(0, 0, 0)
  284. TorsoA5.Rotation = Vector3.new(0, 90, 0)
  285. TorsoA5.Axis = Vector3.new(0, 0, -1)
  286. TorsoA5.SecondaryAxis = Vector3.new(0, 1, 0)
  287. end
  288. function set3()
  289. end
  290. spawn(set1);
  291. spawn(set2);
  292. local HA = Instance.new("HingeConstraint")
  293. HA.Parent = head
  294. HA.Attachment0 = HeadA
  295. HA.Attachment1 = TorsoA4
  296. HA.Enabled = true
  297. HA.LimitsEnabled=true
  298. HA.LowerAngle=0
  299. HA.UpperAngle=0
  300. local LAT = Instance.new("BallSocketConstraint")
  301. LAT.Parent = leftarm
  302. LAT.Attachment0 = LeftArmA
  303. LAT.Attachment1 = TorsoA2
  304. LAT.Enabled = true
  305. LAT.LimitsEnabled=true
  306. LAT.UpperAngle=90
  307. local RAT = Instance.new("BallSocketConstraint")
  308. RAT.Parent = rightarm
  309. RAT.Attachment0 = RightArmA
  310. RAT.Attachment1 = TorsoA3
  311. RAT.Enabled = true
  312. RAT.LimitsEnabled=true
  313. RAT.UpperAngle=90
  314. local HA = Instance.new("BallSocketConstraint")
  315. HA.Parent = head
  316. HA.Attachment0 = HeadA
  317. HA.Attachment1 = TorsoA4
  318. HA.Enabled = true
  319. local TLL = Instance.new("BallSocketConstraint")
  320. TLL.Parent = torso
  321. TLL.Attachment0 = TorsoA1
  322. TLL.Attachment1 = LeftLegA
  323. TLL.Enabled = true
  324. TLL.LimitsEnabled=true
  325. TLL.UpperAngle=90
  326. local TRL = Instance.new("BallSocketConstraint")
  327. TRL.Parent = torso
  328. TRL.Attachment0 = TorsoA
  329. TRL.Attachment1 = RightLegA
  330. TRL.Enabled = true
  331. TRL.LimitsEnabled=true
  332. TRL.UpperAngle=90
  333. local RTA = Instance.new("BallSocketConstraint")
  334. RTA.Parent = root
  335. RTA.Attachment0 = rootA
  336. RTA.Attachment1 = TorsoA5
  337. RTA.Enabled = true
  338. RTA.LimitsEnabled=true
  339. RTA.UpperAngle=0
  340. head.Velocity = head.CFrame.lookVector*30
  341.  
  342. for _,child in next,script.Parent:GetChildren() do
  343. if child:IsA("Accoutrement") then
  344. for _,part in next,child:GetChildren() do
  345. if part:IsA("BasePart") then
  346. part.Parent = script.Parent
  347. child:remove()
  348. local attachment1 = part:FindFirstChildOfClass("Attachment")
  349. local attachment0 = getAttachment0(attachment1.Name)
  350. if attachment0 and attachment1 then
  351. local constraint = Instance.new("HingeConstraint")
  352. constraint.Attachment0 = attachment0
  353. constraint.Attachment1 = attachment1
  354. constraint.LimitsEnabled = true
  355. constraint.UpperAngle = 0
  356. constraint.LowerAngle = 0
  357. constraint.Parent = script.Parent
  358. end
  359. end
  360. end
  361. end
  362. end
  363. end)
  364. end
  365.  
  366.  
  367.  
  368. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement