View difference between Paste ID: kHkCrBdb and CAyDqTh6
SHOW: | | - or go back to the newest paste.
1
-----------------------------------------------
2-
--DANCE TO THE BEAT, WAVE YOUR HANDS TOGETHER--
2+
-- This script has been converted to FE by Guest_EXD
3
4
5
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
6
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
7
do
8
	print("FE Compatibility code by Mokiros | Translated to FE by Guest_EXD")
9
	script.Parent = Player.Character
10-
local Player = game:service'Players'.localPlayer
10+
11
	--RemoteEvent for communicating
12
	local Event = Instance.new("RemoteEvent")
13-
local Mouse = Player:GetMouse()
13+
	Event.Name = "UserInput_Event"
14
15
	--Fake event to make stuff like Mouse.KeyDown work
16
	local function fakeEvent()
17
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
18
		t.connect = t.Connect
19
		return t
20
	end
21
22
	--Creating fake input objects with fake variables
23
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
24
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
25
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
26
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
27
	end}
28
	--Merged 2 functions into one by checking amount of arguments
29
	CAS.UnbindAction = CAS.BindAction
30
31
	--This function will trigger the events that have been :Connect()'ed
32
	local function te(self,ev,...)
33
		local t = m[ev]
34
		if t and t._fakeEvent and t.Function then
35
			t.Function(...)
36
		end
37
	end
38
	m.TrigEvent = te
39
	UIS.TrigEvent = te
40
41
	Event.OnServerEvent:Connect(function(plr,io)
42
	    if plr~=Player then return end
43
		if io.isMouse then
44
			m.Target = io.Target
45
			m.Hit = io.Hit
46
		else
47
			local b = io.UserInputState == Enum.UserInputState.Begin
48
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
49
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
50
			end
51
			for _,t in pairs(CAS.Actions) do
52
				for _,k in pairs(t.Keys) do
53
					if k==io.KeyCode then
54
						t.Function(t.Name,io.UserInputState,io)
55
					end
56
				end
57
			end
58
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
59
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
60
	    end
61
	end)
62
	Event.Parent = NLS([==[
63
	local Player = game:GetService("Players").LocalPlayer
64
	local Event = script:WaitForChild("UserInput_Event")
65
66
	local UIS = game:GetService("UserInputService")
67
	local input = function(io,a)
68
		if a then return end
69
		--Since InputObject is a client-side instance, we create and pass table instead
70
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
71
	end
72
	UIS.InputBegan:Connect(input)
73
	UIS.InputEnded:Connect(input)
74
75
	local Mouse = Player:GetMouse()
76
	local h,t
77
	--Give the server mouse data 30 times every second, but only if the values changed
78
	--If player is not moving their mouse, client won't fire events
79
	while wait(1/30) do
80
		if h~=Mouse.Hit or t~=Mouse.Target then
81
			h,t=Mouse.Hit,Mouse.Target
82
			Event:FireServer({isMouse=true,Target=t,Hit=h})
83
		end
84
	end]==],Player.Character)
85
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
86
end
87
------------------------------------------------
88
--I wanted to make something like Heavy Dance.--
89
-- ~Sugarie									  --
90
------------------------------------------------
91
92
wait(1/60)
93
Effects = { }
94
local Player = owner
95
local chara = Player.Character
96
local Humanoid = chara:FindFirstChildOfClass("Humanoid")
97
local LeftArm = chara["Left Arm"]
98
local RightArm = chara["Right Arm"]
99
local LeftLeg = chara["Left Leg"]
100
local RightLeg = chara["Right Leg"]
101
local Head = chara.Head
102
local Torso = chara.Torso
103
local Camera = game.Workspace.CurrentCamera
104
local RootPart = chara.HumanoidRootPart
105
local RootJoint = RootPart.RootJoint
106
local attack = false
107
local Anim = 'Idle'
108
local attacktype = 1
109
local delays = false
110
local play = true
111
local targetted = nil
112
local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude 
113
local velocity = RootPart.Velocity.y
114
local sine = 0
115
local change = 1
116
local doe = 0
117
local Create = LoadLibrary("RbxUtility").Create
118
Humanoid.WalkSpeed = 2
119
120
Humanoid.Animator.Parent = nil
121
chara.Animate.Parent = nil
122
123
local newMotor = function(part0, part1, c0, c1)
124
	local w = Create('Motor'){
125
		Parent = part0,
126
		Part0 = part0,
127
		Part1 = part1,
128
		C0 = c0,
129
		C1 = c1,
130
	}
131
	return w
132
end
133
134
function clerp(a, b, t)
135
	return a:lerp(b, t)
136
end
137
138
RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
139
NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
140
141
local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) 
142
local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
143
local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
144
local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
145
RootJoint.C1 = CFrame.new(0, 0, 0)
146
RootJoint.C0 = CFrame.new(0, 0, 0)
147
Torso.Neck.C1 = CFrame.new(0, 0, 0)
148
Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
149
150
local rarmc1 = RW.C1
151
local larmc1 = LW.C1
152
local rlegc1 = RH.C1
153
local llegc1 = LH.C1
154
155
local resetc1 = false
156
157
function PlayAnimationFromTable(table, speed, bool)
158
	RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) 
159
	Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) 
160
	RW.C0 = clerp(RW.C0, table[3], speed) 
161
	LW.C0 = clerp(LW.C0, table[4], speed) 
162
	RH.C0 = clerp(RH.C0, table[5], speed) 
163
	LH.C0 = clerp(LH.C0, table[6], speed) 
164
	if bool == true then
165
		if resetc1 == false then
166
			resetc1 = true
167
			RootJoint.C1 = RootJoint.C1
168
			Torso.Neck.C1 = Torso.Neck.C1
169
			RW.C1 = rarmc1
170
			LW.C1 = larmc1
171
			RH.C1 = rlegc1
172
			LH.C1 = llegc1
173
		end
174
	end
175
end
176
177
ArtificialHB = Instance.new("BindableEvent", script)
178
ArtificialHB.Name = "Heartbeat"
179
script:WaitForChild("Heartbeat")
180
frame = 0.03333333333333
181
tf = 0
182
allowframeloss = false
183
tossremainder = false
184
lastframe = tick()
185
script.Heartbeat:Fire()
186
game:GetService("RunService").Heartbeat:connect(function(s, p)
187
  tf = tf + s
188
  if tf >= frame then
189
    if allowframeloss then
190
      script.Heartbeat:Fire()
191
      lastframe = tick()
192
    else
193
      for i = 1, math.floor(tf / frame) do
194
        script.Heartbeat:Fire()
195
      end
196
      lastframe = tick()
197
    end
198
    if tossremainder then
199
      tf = 0
200
    else
201
      tf = tf - frame * math.floor(tf / frame)
202
    end
203
  end
204
end)
205
function swait(num)
206
  if num == 0 or num == nil then
207
    ArtificialHB.Event:wait()
208
  else
209
    for i = 0, num do
210
      ArtificialHB.Event:wait()
211
    end
212
  end
213
end
214
215
function RemoveOutlines(part)
216
	part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
217
end
218
219
sndid = "rbxassetid://176322684"
220
sndpi = .7
221
saun = Instance.new("Sound",Head)
222
saun.Volume = 1
223
saun.Pitch = sndpi
224
saun.SoundId = sndid
225
saun.Name = "a"
226
saun.Looped = true
227
saun:Play()
228
229
dant = 0
230
231
Mouse.KeyDown:connect(function(key)
232
key=key:lower()
233
if key=="e" then
234
if dant == 0 then
235
dant = 1
236
sndid = "rbxassetid://448668887"
237
sndpi = 1
238
elseif dant == 1 then
239
dant = 0
240
sndid = "rbxassetid://176322684"
241
sndpi = .7
242
end
243
saun.Pitch = sndpi
244
saun.SoundId = sndid
245
saun:Play()
246
end
247
end)
248
249
while true do
250
if Head:FindFirstChild("a")==nil then
251
saun = Instance.new("Sound",Head)
252
saun.Volume = 1
253
saun.Pitch = sndpi
254
saun.SoundId = sndid
255
saun.Name = "a"
256
saun.Looped = true
257
saun:Play()
258
end
259
if dant == 0 then
260
for i = 0, 1, 0.25 do
261
swait()
262
PlayAnimationFromTable({
263
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
264
CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
265
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),
266
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),
267
CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
268
CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
269
}, .5, false)
270
end
271
for i = 0, 1, 0.25 do
272
swait()
273
PlayAnimationFromTable({
274
CFrame.new(-0.268402338, -0.187939167, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),
275
CFrame.new(-0.409892142, 1.36144388, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
276
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),
277
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),
278
CFrame.new(0.951213062, -1.54518354, 0, 0.866025686, -0.499999642, 0, 0.499999642, 0.866025686, 0, 0, 0, 1),
279
CFrame.new(0.214191973, -1.8503952, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
280
}, .5, false)
281
end
282
for i = 0, 1, 0.25 do
283
swait()
284
PlayAnimationFromTable({
285
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
286
CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
287
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),
288
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),
289
CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
290
CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
291
}, .5, false)
292
end
293
for i = 0, 1, 0.25 do
294
swait()
295
PlayAnimationFromTable({
296
CFrame.new(0.268400908, -0.187940732, 0, 0.939692855, -0.342019945, 0, 0.342019975, 0.939692795, 0, 0, 0, 1),
297
CFrame.new(0.409947664, 1.36144304, 0, 0.766039729, 0.642798781, 0, -0.642787337, 0.766043961, 0, 0, 0, 1),
298
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),
299
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),
300
CFrame.new(-0.214235365, -1.8503921, 0, 0.766041398, 0.64279145, 0, -0.64279151, 0.766041279, 0, 0, 0, 1),
301
CFrame.new(-0.965987146, -1.57677674, 0, 0.866024733, 0.500001609, 0, -0.500001609, 0.866024613, 0, 0, 0, 1),
302
}, .5, false)
303
end
304
elseif dant == 1 then
305
for i = 0, 1, 0.1 do
306
swait()
307
PlayAnimationFromTable({
308
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
309
CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
310
CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
311
CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
312
CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
313
CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
314
}, .2, false)
315
end
316
for i = 0, 1, 0.1 do
317
swait()
318
PlayAnimationFromTable({
319
CFrame.new(-0.0436433926, 0, -0.113613628, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
320
CFrame.new(0, 1.49999809, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
321
CFrame.new(1.09998989, 1, -0.599998474, 0, 0, 1, 1, 0, 0, 0, 1, 0),
322
CFrame.new(-1.10000229, 1, -0.599998474, 0, 0, -1, -1, 0, 0, 0, 1, 0),
323
CFrame.new(0.499988556, -1.99999797, -3.81469727e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1),
324
CFrame.new(-0.500012398, -1.78038144, -0.819608092, 1, 0, 1.49011612e-08, 0, 0.499999046, -0.866025984, 0, 0.866026044, 0.499999046),
325
}, .2, false)
326
end
327
for i = 0, 1, 0.1 do
328
swait()
329
PlayAnimationFromTable({
330
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
331
CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
332
CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
333
CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
334
CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
335
CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
336
}, .2, false)
337
end
338
for i = 0, 1, 0.1 do
339
swait()
340
PlayAnimationFromTable({
341
CFrame.new(0.261404335, 0, -0.167939946, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414),
342
CFrame.new(0, 1.49999285, 0, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
343
CFrame.new(1.10000622, 0.999999046, -0.599996626, 0, 0, 1.00000012, 1, 0, 0, 0, 1.00000012, 0),
344
CFrame.new(-1.09999859, 0.999999046, -0.59999758, 0, 0, -1.00000012, -1, 0, 0, 0, 1.00000012, 0),
345
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),
346
CFrame.new(-0.500003874, -1.99999893, 3.81469772e-06, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
347
}, .2, false)
348
end
349
end
350
end