Advertisement
wamandnj

Untitled

Mar 19th, 2019
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.79 KB | None | 0 0
  1. local Plr = owner
  2. local char = owner.Character
  3. local plr = owner
  4.  
  5. -- [[ Color Functions ]] --
  6.  
  7. h = math.random(0, 100)
  8. color = Color3.fromHSV(h / 100, 1, 0.9)
  9. lastbeat = 0
  10. lastloud = 0
  11.  
  12. -- [[ Cone ]] --
  13.  
  14. local cone = Instance.new("Part")
  15. cone.Anchored = true
  16. cone.CanCollide = false
  17. cone.Locked = true
  18. cone.Size = Vector3.new(0.5, 0.5, 0.5)
  19. cone.Parent = char
  20. cone.Transparency = 1
  21.  
  22. local conem = Instance.new("SpecialMesh")
  23. conem.MeshType = Enum.MeshType.FileMesh
  24. conem.MeshId = "rbxassetid://120647846"
  25. conem.Scale = Vector3.new(1, 1, 1)
  26. conem.Parent = cone
  27.  
  28.  
  29. --[[ Particles ]]--
  30.  
  31. local partic = Instance.new("ParticleEmitter")
  32. partic.Rate = 50
  33. partic.EmissionDirection = Enum.NormalId.Right
  34. partic.Texture = "rbxassetid://443789987"
  35. partic.LightEmission = 5
  36. partic.LightInfluence = 1
  37. partic.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 1)})
  38. partic.Parent = cone
  39.  
  40. --[[ Light ]]--
  41.  
  42. local lite = Instance.new("PointLight")
  43. lite.Range = 0
  44. lite.Brightness = 0
  45. lite.Parent = char.HumanoidRootPart
  46.  
  47. --[[ Sound ]]--
  48.  
  49. local sound = Instance.new("Sound")
  50. sound.Parent = char.HumanoidRootPart
  51. sound.Volume = 10
  52. sound.Name = "Music"
  53. sound.Looped = true
  54.  
  55. plr.Chatted:connect(function(msg)
  56. if msg:sub(1, 6):lower()=='visual' then
  57. local val = Instance.new("NumberValue", char)
  58. val.Value = tonumber(msg:sub(7))
  59. local id = val.Value
  60. sound:Stop()
  61. sound.SoundId = 'rbxassetid://'..id
  62. sound:Play()
  63. sound.Looped = true
  64. wait()
  65. elseif msg:sub(1,5):lower()=='pitch' then
  66. local val2 = Instance.new("NumberValue", char)
  67. val2.Value = tonumber(msg:sub(6))
  68. local Pitch = val2.Value
  69. sound.Pitch = Pitch
  70. elseif msg:sub(1,3):lower()=='vol' then
  71. local val3 = Instance.new("NumberValue", char)
  72. val3.Value = tonumber(msg:sub(5))
  73. local Volume = val3.Value
  74. sound.Volume = Volume
  75. end
  76. end)
  77.  
  78. --[[ Remote ]]--
  79.  
  80. local Remote = Instance.new("RemoteEvent", char)
  81. Remote.Name = "Event"
  82. local PlaybackSound = 0
  83.  
  84. --[[ Visual ]]--
  85.  
  86. local spin = 0
  87.  
  88. Remote.OnServerEvent:connect(function(plr, Playback)
  89.  
  90. spin = spin + 0.08 + Playback/10000
  91.  
  92. local beat = math.abs(PlaybackSound - lastloud)
  93. if beat > lastbeat then
  94. lastbeat = beat
  95. else
  96. lastbeat = lastbeat - 10
  97. if lastbeat < 0 then
  98. lastbeat = 0
  99. end
  100. end
  101.  
  102. h = (h + beat / 250) % 100
  103. lastloud = PlaybackSound
  104. color = Color3.fromHSV(h / 100, 5, 0.5 + lastbeat / 50)
  105.  
  106. lite.Range = 10 + Playback/25
  107. lite.Brightness = 5 + Playback/5
  108. lite.Color = lite.Color:lerp(Color3.fromHSV(h / 100, 1, 1), 0.25)
  109.  
  110. cone.CFrame = cone.CFrame:lerp(char.Head.CFrame * CFrame.new(0, 5, 0) * CFrame.Angles(0, spin, 0), 0.25)
  111. cone.Color = cone.Color:lerp(Color3.fromHSV(h / 100, 1, 1), 0.25)
  112.  
  113. conem.Scale = conem.Scale:lerp(Vector3.new(1 + Playback/250, 1 + Playback/250, 1 + Playback/250), 0.25)
  114.  
  115. partic.Speed = NumberRange.new(5 + Playback/1000)
  116. partic.Lifetime = NumberRange.new(5 + Playback/1000)
  117. partic.Drag = 5 - Playback/50
  118. partic.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0 + Playback/1000), NumberSequenceKeypoint.new(1, 0.25 + Playback/1000)})
  119. partic.Color = ColorSequence.new(Color3.fromHSV(h / 100, 1, 1), Color3.fromHSV(h / 100, 1, 1))
  120. partic.RotSpeed = NumberRange.new(0 - sound.PlaybackLoudness/-250, 0 + sound.PlaybackLoudness/250)
  121. partic.SpreadAngle = Vector2.new(0 - sound.PlaybackLoudness/-25, 0 + sound.PlaybackLoudness/25)
  122.  
  123. PlaybackSound = Playback
  124.  
  125. end)
  126.  
  127. --[[ Fire Remote ]]--
  128.  
  129. NLS([==[
  130. while wait() do
  131. game:service'Players'.LocalPlayer.Character.Event:FireServer(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Music.PlaybackLoudness)
  132. end
  133. ]==], char)
  134.  
  135. --[[ Debounce ]]--
  136.  
  137. function debounce(func)
  138. local isRunning = false
  139. return function(...)
  140. if not isRunning then
  141. isRunning = true
  142.  
  143. func(...)
  144.  
  145. isRunning = false
  146. end
  147. end
  148. end
  149.  
  150. local BillboardGui = Instance.new("BillboardGui")
  151. local TextLabel = Instance.new("TextLabel")
  152.  
  153. local vol = 1
  154. local song = 0
  155. local pitch = 1
  156. local timepos = nil
  157. local mus = Instance.new("Sound",char)
  158. mus:Destroy()
  159.  
  160. BillboardGui.Name = "tag"
  161. BillboardGui.Parent = char.Head
  162. BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  163. BillboardGui.AlwaysOnTop = false
  164. BillboardGui.ExtentsOffset = Vector3.new(0, 3, 0)
  165. BillboardGui.LightInfluence = 1
  166. BillboardGui.Size = UDim2.new(0, 200, 0, 50)
  167.  
  168. TextLabel.Parent = BillboardGui
  169. TextLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  170. TextLabel.BackgroundTransparency = 1
  171. TextLabel.Size = UDim2.new(0, 200, 0, 50)
  172. TextLabel.Font = Enum.Font.SourceSans
  173. TextLabel.Text = ".Tame vis."
  174. TextLabel.TextColor3 = Color3.new(126, 255, 240)
  175. TextLabel.TextScaled = true
  176. TextLabel.TextSize = 14
  177. TextLabel.TextWrapped = true
  178.  
  179.  
  180. local hum = char:FindFirstChildOfClass("Humanoid")
  181. local idleanim = Instance.new("Animation")
  182. idleanim.Name = "Roblox Idle Animation"
  183. idleanim.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  184. local idleanimplay = hum:LoadAnimation(idleanim)
  185. idleanimplay:Play()
  186. wait(0.1)
  187. if char:FindFirstChild("Animate") then
  188. char.Animate:Destroy()
  189. end
  190. local remote = Instance.new("RemoteEvent", char)
  191. remote.Name = "ReplicationEvent"
  192. local client = NLS([==[
  193. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  194. local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  195. spawn(function()
  196. while game:GetService("RunService").Heartbeat:Wait() do
  197. remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  198. end
  199. end)
  200. game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
  201. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
  202. remote:FireServer(1, input.KeyCode)
  203. end
  204. end)
  205.  
  206. mouse.Button1Down:Connect(function()
  207. remote:FireServer(2)
  208. end)
  209.  
  210. ]==], char)
  211.  
  212. local RS = char.Torso["Right Shoulder"]
  213. local LS = char.Torso["Left Shoulder"]
  214. local RH = char.Torso["Right Hip"]
  215. local LH = char.Torso["Left Hip"]
  216. local rootj = char.HumanoidRootPart.RootJoint
  217. local normalanim = true
  218. local animpose = "Idle"
  219. local sine = 0
  220. local RSnor = RS.C0
  221. local LSnor = LS.C0
  222. local RHnor = RH.C0
  223. local LHnor = LH.C0
  224. local rootjnor = rootj.C0
  225. local ff = Instance.new("ForceField",char)
  226. ff.Visible = false
  227.  
  228. ---------------------------------
  229. -----------Wrapping up-----------
  230. ---------------------------------
  231.  
  232. while game:GetService("RunService").Heartbeat:Wait() do
  233. hum.Health = 9999999
  234. hum.MaxHealth = 9999999
  235. hum.PlatformStand = false
  236. hum.Sit = false
  237.  
  238. for i,v in pairs(char:GetChildren()) do
  239. if v.ClassName == "Accessory" then
  240. v.Handle.Anchored = false
  241. end
  242.  
  243. if v.ClassName == "Part" then
  244. v.Anchored = false
  245. end
  246. end
  247.  
  248. if normalanim then
  249. sine = sine + 1
  250. end
  251.  
  252. if remote.Parent == char then
  253. remote.Name = "ReplicationEvent"
  254. else
  255. remote = Instance.new("RemoteEvent", char)
  256. end
  257. local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
  258. if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
  259. animpose = "Walking"
  260. elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
  261. animpose = "Jumping"
  262. elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
  263. animpose = "Falling"
  264. else
  265. animpose = "Idle"
  266. end
  267. if animpose == "Idle" and normalanim then
  268. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-1.3, 0, 0), 0.15)
  269. rootj.C0 = rootj.C0 * CFrame.new(math.sin(sine / 10) / 7, 0, math.sin(sine / 5) / 10)
  270. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0.3, 0, 0), 0.15)
  271. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0.3, 0, 0), 0.15)
  272. RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(-0.1, 0, 0), 0.15)
  273. LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(-0.1, 0, 0), 0.15)
  274. elseif animpose == "Walking" and normalanim then
  275. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  276. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
  277.  
  278. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
  279.  
  280. RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
  281.  
  282. LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
  283. elseif animpose == "Jumping" and normalanim then
  284. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-0.5, 0, 0), 0.15)
  285. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
  286. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
  287. RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(-0.3, 0, 0), 0.15)
  288. LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(-0.3, 0, 0), 0.15)
  289. elseif animpose == "Falling" and normalanim then
  290. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0.5, 0, 0), 0.15)
  291. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
  292. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
  293. RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(-0.2, 0, 0), 0.15)
  294. LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(-0.2, 0, 0), 0.15)
  295. end
  296.  
  297. if mus.Parent == char then
  298. mus.SoundId = "rbxassetid://"..song
  299. timepos = mus.TimePosition
  300. mus.Pitch = pitch
  301. mus.Volume = vol
  302. else
  303. mus = Instance.new("Sound", char)
  304. mus.Playing = true
  305. mus.Looped = true
  306. mus.TimePosition = timepos
  307. end
  308. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement