Advertisement
Guest User

THINGY LIKE ALWAYS

a guest
Feb 23rd, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6.  
  7. local player = game.Players.LocalPlayer
  8. local char = player.Character
  9. local ispeed = 14.44
  10. local sine = 0
  11. local sine2 = 0
  12. local size = 0
  13. local maxTabs = 74
  14. local ai = 360/maxTabs
  15. hrp=char["HumanoidRootPart"]
  16. rd=math.rad
  17. local fold = Instance.new("Folder")
  18. fold.Name = "Vis"
  19. fold.Parent = char
  20. --------------------------------------
  21. local siner = coroutine.wrap(function()
  22. while true do wait()
  23. sine = sine+1
  24. end
  25. end)
  26. siner()
  27. --------------------------------------
  28. function TweenMe(joint,prop,cfrmz,alp,es,ed)
  29. local ts = game:GetService("TweenService")
  30. local ti = TweenInfo.new(alp,Enum.EasingStyle[es],Enum.EasingDirection[ed],0,false,0)
  31. local pp = {[prop] = cfrmz}
  32. local tween = ts:Create(joint,ti,pp)
  33. tween:Play()
  34. end
  35. function createPart()
  36. local p = Instance.new("Part")
  37. p.Anchored = true
  38. p.CanCollide = false
  39. p.TopSurface = "Smooth"
  40. p.BottomSurface = "Smooth"
  41. p.Material = "SmoothPlastic"
  42. p.Size = Vector3.new(1,1,1)
  43. p.CFrame = CFrame.new(hrp.CFrame.p)
  44. return p
  45. end
  46. local idk = 4
  47. local eh = 360/idk
  48. for i = 1,360/ai do
  49.  
  50. local p = createPart()
  51. p.Parent = fold
  52. p.CFrame = CFrame.new(hrp.CFrame.p)*CFrame.Angles(rd(0),rd(i*ai),rd(0))*CFrame.new(0,1*math.cos(sine/ispeed),10)
  53. end
  54.  
  55. -------------------------------------- game:GetService("RunService").RenderStepped:Wait()
  56. local music = coroutine.wrap(function()
  57. while true do wait()
  58. local gc = fold:GetChildren()
  59. for i = 1,#gc do
  60. sine2=sine2+0.5
  61. local l = tick()+sine2
  62. local p = gc[i]
  63. TweenMe(p,'Color',Color3.new(size*math.sin(l)/255,0/255,-size*math.sin(l)/255),1,"Sine","Out")
  64. local size2 = size*4
  65. TweenMe(p,'CFrame',hrp.CFrame*CFrame.Angles(rd(0),rd(i*ai),rd(0))*CFrame.new(0,size*math.sin(l)*0.5,5+size/2),0.5,'Sine','Out')
  66. end
  67. end
  68. end)
  69. music()
  70. --------------------------------------
  71. local playing = false
  72. player.Chatted:connect(function(chat)
  73. if chat:sub(1,3) == "~s " then
  74. local num = chat:sub(4)
  75. size = num
  76. elseif chat:sub(1,6) == "~play " then
  77. if hrp:FindFirstChild("music") ~= nil then
  78. size = 0
  79. playing = false
  80. hrp["music"]:Remove()
  81. end
  82. wait(1)
  83. local id = chat:sub(7)
  84. local music = Instance.new("Sound",hrp)
  85. music.Looped = true
  86. music.Name = "music"
  87. music.Volume = 1
  88. music.SoundId = "rbxassetid://"..id
  89. music.MaxDistance = 100
  90. music.EmitterSize = 100
  91. music:Play()
  92. playing = true
  93. local visualize = coroutine.wrap(function()
  94. repeat wait()
  95. size = music.PlaybackLoudness/10
  96. until playing == false
  97. end)
  98. visualize()
  99. elseif chat == "~stop" then
  100. if hrp:FindFirstChild("music") ~= nil then
  101. size = 0
  102. playing = false
  103. hrp["music"]:Remove()
  104. end
  105. end
  106. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement