Advertisement
DrawingJhon

CaramellDance FE

Aug 16th, 2020 (edited)
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.75 KB | None | 0 0
  1. --[[require(3747589551)()
  2. -- nebula's ezconvert
  3. PUT YOUR SCRIPTS BELOW HERE VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 
  4. ]]
  5.  
  6. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  7. local Player,game,owner = owner,game
  8. local RealPlayer = Player
  9. do
  10.     print("FE Compatibility code V2 by Mokiros")
  11.     local RealPlayer = RealPlayer
  12.     script.Parent = RealPlayer.Character
  13.  
  14.     --Fake event to make stuff like Mouse.KeyDown work
  15.     local Disconnect_Function = function(this)
  16.         this[1].Functions[this[2]] = nil
  17.     end
  18.     local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  19.     local FakeEvent_Metatable = {__index={
  20.         Connect = function(this,f)
  21.             local i = tostring(math.random(0,10000))
  22.             while this.Functions[i] do
  23.                 i = tostring(math.random(0,10000))
  24.             end
  25.             this.Functions[i] = f
  26.             return setmetatable({this,i},Disconnect_Metatable)
  27.         end
  28.     }}
  29.     FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  30.     local function fakeEvent()
  31.         return setmetatable({Functions={}},FakeEvent_Metatable)
  32.     end
  33.  
  34.     --Creating fake input objects with fake variables
  35.     local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  36.     FakeMouse.keyUp = FakeMouse.KeyUp
  37.     FakeMouse.keyDown = FakeMouse.KeyDown
  38.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  39.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  40.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  41.     end}
  42.     --Merged 2 functions into one by checking amount of arguments
  43.     CAS.UnbindAction = CAS.BindAction
  44.  
  45.     --This function will trigger the events that have been :Connect()'ed
  46.     local function TriggerEvent(self,ev,...)
  47.         for _,f in pairs(self[ev].Functions) do
  48.             f(...)
  49.         end
  50.     end
  51.     FakeMouse.TriggerEvent = TriggerEvent
  52.     UIS.TriggerEvent = TriggerEvent
  53.  
  54.     --Client communication
  55.     local Event = Instance.new("RemoteEvent")
  56.     Event.Name = "UserInput_Event"
  57.     Event.OnServerEvent:Connect(function(plr,io)
  58.         if plr~=RealPlayer then return end
  59.         FakeMouse.Target = io.Target
  60.         FakeMouse.Hit = io.Hit
  61.         if not io.isMouse then
  62.             local b = io.UserInputState == Enum.UserInputState.Begin
  63.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  64.                 return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  65.             end
  66.             if io.UserInputType == Enum.UserInputType.MouseButton2 then
  67.                 return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  68.             end
  69.             for _,t in pairs(CAS.Actions) do
  70.                 for _,k in pairs(t.Keys) do
  71.                     if k==io.KeyCode then
  72.                         t.Function(t.Name,io.UserInputState,io)
  73.                     end
  74.                 end
  75.             end
  76.             FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  77.             UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  78.         end
  79.     end)
  80.     Event.Parent = NLS([[local Event = script:WaitForChild("UserInput_Event")
  81.     local Mouse = owner:GetMouse()
  82.     local UIS = game:GetService("UserInputService")
  83.     local input = function(io,RobloxHandled)
  84.         if RobloxHandled then return end
  85.         --Since InputObject is a client-side instance, we create and pass table instead
  86.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  87.     end
  88.     UIS.InputBegan:Connect(input)
  89.     UIS.InputEnded:Connect(input)
  90.     local h,t
  91.     --Give the server mouse data every second frame, but only if the values changed
  92.     --If player is not moving their mouse, client won't fire events
  93.     local HB = game:GetService("RunService").Heartbeat
  94.     while true do
  95.         if h~=Mouse.Hit or t~=Mouse.Target then
  96.             h,t=Mouse.Hit,Mouse.Target
  97.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  98.         end
  99.         --Wait 2 frames
  100.         for i=1,2 do
  101.             HB:Wait()
  102.         end
  103.     end]],script)
  104.  
  105.     ----Sandboxed game object that allows the usage of client-side methods and services
  106.     --Real game object
  107.     local RealGame = game
  108.  
  109.     --Metatable for fake service
  110.     local FakeService_Metatable = {
  111.         __index = function(self,k)
  112.             local s = rawget(self,"_RealService")
  113.             if s then
  114.                 return typeof(s[k])=="function"
  115.                 and function(_,...)return s[k](s,...)end or s[k]
  116.             end
  117.         end,
  118.         __newindex = function(self,k,v)
  119.             local s = rawget(self,"_RealService")
  120.             if s then s[k]=v end
  121.         end
  122.     }
  123.     local function FakeService(t,RealService)
  124.         t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  125.         return setmetatable(t,FakeService_Metatable)
  126.     end
  127.  
  128.     --Fake game object
  129.     local FakeGame = {
  130.         GetService = function(self,s)
  131.             return rawget(self,s) or RealGame:GetService(s)
  132.         end,
  133.         Players = FakeService({
  134.             LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  135.         },"Players"),
  136.         UserInputService = FakeService(UIS,"UserInputService"),
  137.         ContextActionService = FakeService(CAS,"ContextActionService"),
  138.         RunService = FakeService({
  139.             _btrs = {},
  140.             RenderStepped = RealGame:GetService("RunService").Heartbeat,
  141.             BindToRenderStep = function(self,name,_,fun)
  142.                 self._btrs[name] = self.Heartbeat:Connect(fun)
  143.             end,
  144.             UnbindFromRenderStep = function(self,name)
  145.                 self._btrs[name]:Disconnect()
  146.             end,
  147.         },"RunService")
  148.     }
  149.     rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  150.     FakeGame.service = FakeGame.GetService
  151.     FakeService(FakeGame,game)
  152.     --Changing owner to fake player object to support owner:GetMouse()
  153.     game,owner = FakeGame,FakeGame.Players.LocalPlayer
  154. end
  155.  
  156. wait(1/60)
  157. Effects = { }
  158. local Player = game:service'Players'.localPlayer
  159. local chara = Player.Character
  160. local Humanoid = chara:FindFirstChildOfClass("Humanoid")
  161. local Mouse = Player:GetMouse()
  162. local LeftArm = chara["Left Arm"]
  163. local RightArm = chara["Right Arm"]
  164. local LeftLeg = chara["Left Leg"]
  165. local RightLeg = chara["Right Leg"]
  166. local Head = chara.Head
  167. local Torso = chara.Torso
  168. local Camera = game.Workspace.CurrentCamera
  169. local RootPart = chara.HumanoidRootPart
  170. local RootJoint = RootPart.RootJoint
  171. local attack = false
  172. local Anim = 'Idle'
  173. local attacktype = 1
  174. local delays = false
  175. local play = true
  176. local targetted = nil
  177. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  178. local velocity = RootPart.Velocity.y
  179. local sine = 0
  180. local change = 1
  181. local doe = 0
  182. local Create = LoadLibrary("RbxUtility").Create
  183. Humanoid.WalkSpeed = 2
  184. Humanoid.Animator.Parent = nil
  185. chara.Animate.Parent = nil
  186. local newMotor = function(part0, part1, c0, c1)
  187.     local w = Create('Motor'){
  188.         Parent = part0,
  189.         Part0 = part0,
  190.         Part1 = part1,
  191.         C0 = c0,
  192.         C1 = c1,
  193.     }
  194.     return w
  195. end
  196. function clerp(a, b, t)
  197.     return a:lerp(b, t)
  198. end
  199. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  200. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  201. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  202. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  203. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  204. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  205. RootJoint.C1 = CFrame.new(0, 0, 0)
  206. RootJoint.C0 = CFrame.new(0, 0, 0)
  207. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  208. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  209. local rarmc1 = RW.C1
  210. local larmc1 = LW.C1
  211. local rlegc1 = RH.C1
  212. local llegc1 = LH.C1
  213. local resetc1 = false
  214. function PlayAnimationFromTable(table, speed, bool)
  215.     RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  216.     Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  217.     RW.C0 = clerp(RW.C0, table[3], speed)
  218.     LW.C0 = clerp(LW.C0, table[4], speed)
  219.     RH.C0 = clerp(RH.C0, table[5], speed)
  220.     LH.C0 = clerp(LH.C0, table[6], speed)
  221.     if bool == true then
  222.         if resetc1 == false then
  223.             resetc1 = true
  224.             RootJoint.C1 = RootJoint.C1
  225.             Torso.Neck.C1 = Torso.Neck.C1
  226.             RW.C1 = rarmc1
  227.             LW.C1 = larmc1
  228.             RH.C1 = rlegc1
  229.             LH.C1 = llegc1
  230.         end
  231.     end
  232. end
  233. ArtificialHB = Instance.new("BindableEvent", script)
  234. ArtificialHB.Name = "Heartbeat"
  235. script:WaitForChild("Heartbeat")
  236. frame = 0.03333333333333
  237. tf = 0
  238. allowframeloss = false
  239. tossremainder = false
  240. lastframe = tick()
  241. script.Heartbeat:Fire()
  242. game:GetService("RunService").Heartbeat:connect(function(s, p)
  243.   tf = tf + s
  244.   if tf >= frame then
  245.     if allowframeloss then
  246.       script.Heartbeat:Fire()
  247.       lastframe = tick()
  248.     else
  249.       for i = 1, math.floor(tf / frame) do
  250.         script.Heartbeat:Fire()
  251.       end
  252.       lastframe = tick()
  253.     end
  254.     if tossremainder then
  255.       tf = 0
  256.     else
  257.       tf = tf - frame * math.floor(tf / frame)
  258.     end
  259.   end
  260. end)
  261. function swait(num)
  262.   if num == 0 or num == nil then
  263.     ArtificialHB.Event:wait()
  264.   else
  265.     for i = 0, num do
  266.       ArtificialHB.Event:wait()
  267.     end
  268.   end
  269. end
  270. function RemoveOutlines(part)
  271.     part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  272. end
  273. sndid = "rbxassetid://176322684"
  274. sndpi = .7
  275. saun = Instance.new("Sound",Head)
  276. saun.Volume = 1
  277. saun.Pitch = sndpi
  278. saun.SoundId = sndid
  279. saun.Name = "a"
  280. saun.Looped = true
  281. saun:Play()
  282. dant = 0
  283. Mouse.KeyDown:connect(function(key)
  284. key=key:lower()
  285. if key=="e" then
  286. if dant == 0 then
  287. dant = 1
  288. sndid = "rbxassetid://448668887"
  289. sndpi = 1
  290. elseif dant == 1 then
  291. dant = 0
  292. sndid = "rbxassetid://176322684"
  293. sndpi = .7
  294. end
  295. saun.Pitch = sndpi
  296. saun.SoundId = sndid
  297. saun:Play()
  298. end
  299. end)
  300. while true do
  301. if Head:FindFirstChild("a")==nil then
  302. saun = Instance.new("Sound",Head)
  303. saun.Volume = 1
  304. saun.Pitch = sndpi
  305. saun.SoundId = sndid
  306. saun.Name = "a"
  307. saun.Looped = true
  308. saun:Play()
  309. end
  310. if dant == 0 then
  311. for i = 0, 1, 0.25 do
  312. swait()
  313. PlayAnimationFromTable({
  314. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  315. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  316. CFrame.new(0.833580494, 1.12330246, 6.2584877e-07, -0.342020094, -1.63087847e-07, 0.939692676, 0.321394086, -0.939692557, 0.116977669, 0.883022249, 0.342020333, 0.321393758),
  317. CFrame.new(-0.833579302, 1.12330115, -1.49011612e-07, -0.342019886, 4.07719511e-08, -0.939692736, -0.321392894, -0.939693034, 0.116977319, -0.883022726, 0.342019141, 0.321393728),
  318. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  319. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  320. }, .5, false)
  321. end
  322. for i = 0, 1, 0.25 do
  323. swait()
  324. PlayAnimationFromTable({
  325. CFrame.new(-0.268402338, -0.187939167, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),
  326. CFrame.new(-0.409892142, 1.36144388, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  327. CFrame.new(0.535924554, 1.16478181, 3.87430191e-07, -0.431316972, 0.32139343, 0.843013644, 0.185034022, -0.883022308, 0.431316644, 0.883022249, 0.342020333, 0.321393758),
  328. CFrame.new(-1.03069234, 0.594579875, -2.38418579e-07, -0.211470842, 0.321393758, -0.923030972, -0.418988168, -0.883022726, -0.211470872, -0.883022726, 0.342019141, 0.321393728),
  329. CFrame.new(0.951213062, -1.54518354, 0, 0.866025686, -0.499999642, 0, 0.499999642, 0.866025686, 0, 0, 0, 1),
  330. CFrame.new(0.214191973, -1.8503952, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  331. }, .5, false)
  332. end
  333. for i = 0, 1, 0.25 do
  334. swait()
  335. PlayAnimationFromTable({
  336. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  337. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  338. CFrame.new(0.833580494, 1.12330246, 6.2584877e-07, -0.342020094, -1.63087847e-07, 0.939692676, 0.321394086, -0.939692557, 0.116977669, 0.883022249, 0.342020333, 0.321393758),
  339. CFrame.new(-0.833579302, 1.12330115, -1.49011612e-07, -0.342019886, 4.07719511e-08, -0.939692736, -0.321392894, -0.939693034, 0.116977319, -0.883022726, 0.342019141, 0.321393728),
  340. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  341. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  342. }, .5, false)
  343. end
  344. for i = 0, 1, 0.25 do
  345. swait()
  346. PlayAnimationFromTable({
  347. CFrame.new(0.268400908, -0.187940732, 0, 0.939692855, -0.342019945, 0, 0.342019975, 0.939692795, 0, 0, 0, 1),
  348. CFrame.new(0.409947664, 1.36144304, 0, 0.766039729, 0.642798781, 0, -0.642787337, 0.766043961, 0, 0, 0, 1),
  349. CFrame.new(1.03070939, 0.594575524, -2.2649765e-06, -0.21146287, -0.321413547, 0.923025966, 0.418989599, -0.883016884, -0.21149224, 0.883023918, 0.342015505, 0.321394145),
  350. CFrame.new(-0.535904408, 1.16477537, -3.27825546e-07, -0.431322306, -0.321409196, -0.843005002, -0.185032129, -0.883013964, 0.431334615, -0.883019984, 0.342027217, 0.321392536),
  351. CFrame.new(-0.214235365, -1.8503921, 0, 0.766041398, 0.64279145, 0, -0.64279151, 0.766041279, 0, 0, 0, 1),
  352. CFrame.new(-0.965987146, -1.57677674, 0, 0.866024733, 0.500001609, 0, -0.500001609, 0.866024613, 0, 0, 0, 1),
  353. }, .5, false)
  354. end
  355. elseif dant == 1 then
  356. for i = 0, 1, 0.1 do
  357. swait()
  358. PlayAnimationFromTable({
  359. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  360. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  361. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  362. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  363. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  364. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  365. }, .2, false)
  366. end
  367. for i = 0, 1, 0.1 do
  368. swait()
  369. PlayAnimationFromTable({
  370. CFrame.new(-0.0436433926, 0, -0.113613628, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  371. CFrame.new(0, 1.49999809, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  372. CFrame.new(1.09998989, 1, -0.599998474, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  373. CFrame.new(-1.10000229, 1, -0.599998474, 0, 0, -1, -1, 0, 0, 0, 1, 0),
  374. CFrame.new(0.499988556, -1.99999797, -3.81469727e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  375. CFrame.new(-0.500012398, -1.78038144, -0.819608092, 1, 0, 1.49011612e-08, 0, 0.499999046, -0.866025984, 0, 0.866026044, 0.499999046),
  376. }, .2, false)
  377. end
  378. for i = 0, 1, 0.1 do
  379. swait()
  380. PlayAnimationFromTable({
  381. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  382. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  383. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  384. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  385. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  386. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  387. }, .2, false)
  388. end
  389. for i = 0, 1, 0.1 do
  390. swait()
  391. PlayAnimationFromTable({
  392. CFrame.new(0.261404335, 0, -0.167939946, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414),
  393. CFrame.new(0, 1.49999285, 0, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  394. CFrame.new(1.10000622, 0.999999046, -0.599996626, 0, 0, 1.00000012, 1, 0, 0, 0, 1.00000012, 0),
  395. CFrame.new(-1.09999859, 0.999999046, -0.59999758, 0, 0, -1.00000012, -1, 0, 0, 0, 1.00000012, 0),
  396. CFrame.new(0.500000179, -1.78038287, -0.81961149, 1.00000012, -2.98023224e-08, 2.98023224e-08, 0, 0.499999046, -0.866025925, 0, 0.866025984, 0.499999106),
  397. CFrame.new(-0.500003874, -1.99999893, 3.81469772e-06, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  398. }, .2, false)
  399. end
  400. end
  401. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement