View difference between Paste ID: m9Fwy0XK and 5p6a0cSa
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
local RealPlayer = Player
4
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()}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;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 t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)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 self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({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")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
5
6
b = game.Players.LocalPlayer
7
8
p = game.Players.LocalPlayer
9
ch = p.Character
10
11
h1 = Instance.new("Accessory", ch)
12
hh = Instance.new("Part", h1)
13
hh.Name = "Handle"
14
mm = Instance.new("SpecialMesh", hh)
15
mm.MeshId = "rbxassetid://1076171579"
16
mm.TextureId = "rbxassetid://1076171180"
17
18
mm.Offset = Vector3.new(0, 0.13, 0)
19
20
h = ch:findFirstChildOfClass("Shirt")
21
if h ~= nil then
22
h:remove()
23
24
f = ch:findFirstChildOfClass("Pants")
25
if f ~= nil then
26
f:remove()
27
28
p = Instance.new("Shirt", ch)
29
p.ShirtTemplate = "rbxassetid://610537821"
30
31
pp = Instance.new("Pants", ch)
32
pp.PantsTemplate = "rbxassetid://789678565"
33
end
34
end
35
36
ch["Body Colors"].HeadColor = BrickColor.new("Pastel brown")
37
ch["Body Colors"].TorsoColor = BrickColor.new("Pastel brown")
38
ch["Body Colors"].LeftArmColor = BrickColor.new("Pastel brown")
39
ch["Body Colors"].RightArmColor = BrickColor.new("Pastel brown")
40
ch["Body Colors"].LeftLegColor = BrickColor.new("Pastel brown")
41
ch["Body Colors"].RightLegColor = BrickColor.new("Pastel brown")
42
43
f = Instance.new("Tool", b.Backpack)
44
45
h = Instance.new("Part", f)
46
47
h.Name = "Handle"
48
h.Transparency = 1
49
50
m = Instance.new("SpecialMesh", h)
51
52
s = Instance.new("Sound", ch.Head)
53
s.Name = "NAME"
54
s.SoundId = "rbxassetid://168892708"
55
s.Volume = 10
56
s.Pitch = 1
57
58
59
f.Name = "FUSRODAH"
60
61
script.Name = "AnimationPlayerScript"
62
script.Parent = f
63
64
-------------------------------------------------mah oe---------------------------------------------------
65
66
function FindAttachedHumanoid(part) --made my mincatx
67
	local tpart = part
68
	while tpart.Parent do
69
		if tpart.Parent:FindFirstChild('Humanoid') then return tpart.Parent.Humanoid end
70
		tpart = tpart.Parent
71
	end
72
	return nil --m1nc@tx
73
end
74
75
function MakeValue(class,name,value,parent)
76
	local temp = Instance.new(class)
77
	temp.Name = name -- mincatx
78
	temp.Value = value
79
	temp.Parent = parent
80
	return temp
81
end	
82
83
local Tool = script.Parent
84
local Handle = Tool:WaitForChild('Handle')
85
local YellSound = ch.Head:WaitForChild('NAME')
86
local AniScript = Tool:WaitForChild('AnimationPlayerScript')
87
local ThrowAnimation = 'http://www.roblox.com/Asset?ID=111898867'
88
89
local ThrowFace = 'http://www.roblox.com/asset?id=145104475'
90-
	ThrowTable.Transparency = 0.2 --mincatx
90+
91-
	ThrowTable.Size = Vector3.new(18, 18, 15)
91+
92
do
93
94
	ThrowTable.FormFactor='Custom'
95
	ThrowTable.Transparency = 1 --mincatx
96
	ThrowTable.Size = Vector3.new(5, 5, 5)
97
	ThrowTable.CanCollide = true
98
end
99
100
local LookGyro= Instance.new('BodyGyro')
101
LookGyro.maxTorque = Vector3.new(0,math.huge,0) 
102
103
local ActivateLock=false
104
105
Tool.Activated:connect(function()
106
	if ActivateLock then return end
107
	ActivateLock = true --m1ncatx
108
	local character = Tool.Parent
109
	local humanoid = character:WaitForChild('Humanoid')
110
	local torso = character:WaitForChild('Torso')
111
	local head = character:WaitForChild('Head')
112
	local face = head:FindFirstChild('face')
113
	local oldFace ='' --m1nc@tx
114
	if face then oldFace = face.Texture end
115
	LookGyro.cframe = torso.CFrame - torso.CFrame.p
116
	LookGyro.Parent = torso
117
	
118
	local ntable =  ThrowTable:Clone()
119
	
120
	MakeValue('StringValue','aniId',ThrowAnimation,AniScript)	
121
	wait(.5)
122
	ntable.Parent = Workspace
123
	ntable.CFrame = torso.CFrame+(torso.CFrame.lookVector*3)
124
	YellSound:play()	
125
	wait(4.5)  
126
	
127
	wait(.5) -- mincatx
128
	if face then	
129
		face.Texture=ThrowFace
130
	end
131
	
132
	
133
	
134
	local bAVel = Instance.new('BodyAngularVelocity')
135
	bAVel.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
136
	bAVel.angularvelocity = ((torso.CFrame*CFrame.Angles(0,math.pi/2,0)).lookVector*10)
137
	bAVel.Parent = ntable
138
	
139
	local bVel = Instance.new('BodyVelocity')
140
	bVel.maxForce = Vector3.new(math.huge,0,math.huge)
141
	bVel.velocity = (torso.CFrame.lookVector*300)
142
	bVel.Parent = ntable
143
144
	ntable.Touched:connect(function(part) -- minc@tx
145
		
146
		Spawn(function()
147
     		if part.Name == 'Terrain' then return end --m1inc@atx                       --mincatx
148
			if part.Anchored then return end
149
			local hitHumanoid = FindAttachedHumanoid(part)
150
			if hitHumanoid then
151
				
152
				if hitHumanoid==humanoid then return end
153
				hitHumanoid.PlatformStand = true 
154-
			print('got past wait')
154+
155
			if part.Size.x*part.Size.y*part.Size.z<=5*9*5 then
156-
				print('unplatformstanding')
156+
157
			end
158
			wait(3)
159
			if hitHumanoid then --mincatx
160
				hitHumanoid.PlatformStand=false 
161
				hitHumanoid.Jump = true 
162
			end
163
		end)
164
	end)
165
--m1ncatx
166
	wait(6)
167
	LookGyro.Parent = nil
168
	if face then	
169
		face.Texture=oldFace -- m1nc@tx
170
	end
171
	ntable.CanCollide = false
172
	game.Debris:AddItem(ntable,5)
173
	ActivateLock = false
174
end)
175
function FindAttachedHumanoid(part)
176
	local tpart = part
177
	while tpart.Parent do
178
		if tpart.Parent:FindFirstChild('Humanoid') then return tpart.Parent.Humanoid end
179
		tpart = tpart.Parent
180
	end
181
	return nil
182
end
183
184
script.ChildAdded:connect(function(nchild)
185
	local humanoid = FindAttachedHumanoid(script)
186
	local ani = Instance.new('Animation')
187
	ani.AnimationId = "rbxassetid://96621537"
188
	local aniTrack=humanoid:LoadAnimation(ani)
189
	wait(4.5)  -- Wait for the FUS RO DAH     -Jasondee1
190
	aniTrack:Play()
191
end)