View difference between Paste ID: qjpS2h0b and aqzDMjvj
SHOW: | | - or go back to the newest paste.
1
--Converted with ttyyuu12345's model to script plugin v4
2
function sandbox(var,func)
3
	local env = getfenv(func)
4
	local newenv = setmetatable({},{
5
		__index = function(self,k)
6
			if k=="script" then
7
				return var
8
			else
9
				return env[k]
10
			end
11
		end,
12
	})
13
	setfenv(func,newenv)
14
	return func
15
end
16
cors = {}
17
mas = Instance.new("Model",game:GetService("Lighting"))
18
Tool0 = Instance.new("Tool")
19
Part1 = Instance.new("Part")
20
SpecialMesh2 = Instance.new("SpecialMesh")
21
Sound3 = Instance.new("Sound")
22
Sound4 = Instance.new("Sound")
23
Script5 = Instance.new("Script")
24
LocalScript6 = Instance.new("LocalScript")
25
Camera7 = Instance.new("Camera")
26
Tool0.Name = "RageTable"
27
Tool0.Parent = owner.Character
28
Tool0.TextureId = "http://www.roblox.com/asset/?id=111900204"
29
Tool0.Grip = CFrame.new(0, 0, 0.300000012, 1, 0, 0, 0, 1, 0, 0, 0, 1)
30
Tool0.GripPos = Vector3.new(0, 0, 0.300000012)
31
Tool0.ToolTip = "Flip Out"
32
Part1.Name = "Handle"
33
Part1.Parent = Tool0
34
Part1.CanCollide = false
35
Part1.Orientation = Vector3.new(0, -90, 0)
36
Part1.Position = Vector3.new(174.379974, 0.335009992, 209.612976)
37
Part1.Rotation = Vector3.new(174.240005, -89.9700012, 174.240005)
38
Part1.Size = Vector3.new(1.20000005, 0.669994831, 0.669994712)
39
Part1.BottomSurface = Enum.SurfaceType.Smooth
40
Part1.TopSurface = Enum.SurfaceType.Smooth
41
Part1.FormFactor = Enum.FormFactor.Custom
42
Part1.formFactor = Enum.FormFactor.Custom
43
Part1.CanCollide = false
44
SpecialMesh2.Parent = Part1
45
SpecialMesh2.MeshId = "rbxassetid://430073345"
46
SpecialMesh2.Scale = Vector3.new(0.5, 0.5, 0.5)
47
SpecialMesh2.TextureId = "rbxassetid://430073362"
48
SpecialMesh2.MeshType = Enum.MeshType.FileMesh
49
Sound3.Parent = Part1
50
Sound3.SoundId = "http://www.roblox.com/asset/?id=111896685"
51
Sound3.Volume = 1
52
Sound4.Name = "epicmusic"
53
Sound4.Parent = Part1
54
Sound4.Looped = true
55
Sound4.Playing = true
56
Sound4.SoundId = "rbxassetid://3159332644"
57
Sound4.Volume = 10
58
Script5.Parent = Tool0
59
table.insert(cors,sandbox(Script5,function()
60
function FindAttachedHumanoid(part)
61
	local tpart = part
62
	while tpart.Parent do
63
		if tpart.Parent:FindFirstChild('Humanoid') then return tpart.Parent.Humanoid end
64
		tpart = tpart.Parent
65
	end
66
	return nil
67
end
68
69
function MakeValue(class,name,value,parent)
70
	local temp = Instance.new(class)
71
	temp.Name = name
72
	temp.Value = value
73
	temp.Parent = parent
74
	return temp
75
end	
76
77
local Tool = script.Parent
78
local Handle = Tool:WaitForChild('Handle')
79
local YellSound = Handle:WaitForChild('Sound')
80
local AniScript = Tool:WaitForChild('AnimationPlayerScript')
81
--http://www.roblox.com/Asset?ID=111898513'--http://www.roblox.com/Asset?ID=111880514'
82
local ThrowAnimation = 'http://www.roblox.com/Asset?ID=111898867'
83
84
local ThrowFace = 'http://www.roblox.com/asset?id=111882478'
85
86
local ThrowTable= Instance.new('Part')
87
do
88
	--ThrowTable.Shape = 'Ball'
89
	ThrowTable.FormFactor='Custom'
90
	ThrowTable.Size = Vector3.new(4.8, 2.43, 3.63)
91
	ThrowTable.CanCollide = true
92
	local tmesh = Instance.new('SpecialMesh')
93
	tmesh.MeshId = "rbxassetid://430073345"
94
	tmesh.TextureId = "rbxassetid://430073362"
95
	tmesh.Parent = ThrowTable
96
end
97
98
local LookGyro= Instance.new('BodyGyro')
99
LookGyro.maxTorque = Vector3.new(0,math.huge,0) 
100
101
local ActivateLock=false
102
103
Tool.Activated:connect(function()
104
	if ActivateLock then return end
105
	ActivateLock = true
106
	local character = Tool.Parent
107
	local humanoid = character:WaitForChild('Humanoid')
108
	local torso = character:WaitForChild('Torso')
109
	local head = character:WaitForChild('Head')
110
	local face = head:FindFirstChild('face')
111
	local oldFace =''
112
	if face then oldFace = face.Texture end
113
	humanoid.WalkSpeed = 0
114
	LookGyro.cframe = torso.CFrame - torso.CFrame.p
115
	LookGyro.Parent = torso
116
	
117
	local ntable =  ThrowTable:Clone()
118
	ntable.CFrame = torso.CFrame+(torso.CFrame.lookVector*3)
119
	ntable.Parent = Workspace	
120
	
121
	MakeValue('StringValue','aniId',ThrowAnimation,AniScript)	
122
	wait(.5)
123
	YellSound:play()
124
	wait(.5)	
125
	if face then	
126
		face.Texture=ThrowFace
127
	end
128
	
129
	
130
	
131
	local bAVel = Instance.new('BodyAngularVelocity')
132
	bAVel.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
133
	bAVel.angularvelocity = ((torso.CFrame*CFrame.Angles(0,math.pi/2,0)).lookVector*10)
134
	bAVel.Parent = ntable
135
	
136
	local bVel = Instance.new('BodyVelocity')
137
	bVel.maxForce = Vector3.new(math.huge,0,math.huge)
138
	bVel.velocity = (torso.CFrame.lookVector*25)
139
	bVel.Parent = ntable
140
141
	ntable.Touched:connect(function(part)
142
		--print('GotTouched:' .. part.Name)
143
		Spawn(function()
144
			if part.Name == 'Terrain' then return end
145
			if part.Anchored then return end
146
			local hitHumanoid = FindAttachedHumanoid(part)
147
			if hitHumanoid then
148
				--print('HumanoidParent:'..hitHumanoid.Parent.Name)
149
				if hitHumanoid==humanoid then return end
150
				hitHumanoid.PlatformStand =true 
151
			end
152
			if part.Size.x*part.Size.y*part.Size.z<=5*9*5 then
153
				part.Velocity = (Vector3.new((math.random()-.5)*2,math.random(),(math.random()-.5)*2).unit)*150
154
			end
155
			wait(3)
156
			if hitHumanoid then
157
				hitHumanoid.PlatformStand=false 
158
				hitHumanoid.Jump = true 
159
			end
160
		end)
161
	end)
162
163
	wait(3)
164
	LookGyro.Parent = nil
165
	humanoid.WalkSpeed = 16
166
	if face then	
167
		face.Texture=oldFace
168
	end
169
	ntable.CanCollide = false
170
	game.Debris:AddItem(ntable,5)
171
	ActivateLock = false
172
end)
173
end))
174
LocalScript6.Name = "AnimationPlayerScript"
175
LocalScript6.Parent = Tool0
176
table.insert(cors,sandbox(LocalScript6,function()
177
function FindAttachedHumanoid(part)
178
	local tpart = part
179
	while tpart.Parent do
180
		if tpart.Parent:FindFirstChild('Humanoid') then return tpart.Parent.Humanoid end
181
		tpart = tpart.Parent
182
	end
183
	return nil
184
end
185
186
script.ChildAdded:connect(function(nchild)
187
	local humanoid = FindAttachedHumanoid(script)
188
	local ani = Instance.new('Animation')
189
	ani.AnimationId= nchild.Value
190
	local aniTrack=humanoid:LoadAnimation(ani)
191
	aniTrack:Play()
192
end)
193
end))
194
Camera7.Name = "ThumbnailCamera"
195
Camera7.Parent = Tool0
196
Camera7.CFrame = CFrame.new(0.68505764, 33.5573082, -36.7884026, 0.658647597, 0.32750383, -0.67743969, -1.49011612e-08, 0.90031004, 0.43524906, 0.752451539, -0.286675751, 0.59298712)
197
Camera7.CoordinateFrame = CFrame.new(0.68505764, 33.5573082, -36.7884026, 0.658647597, 0.32750383, -0.67743969, -1.49011612e-08, 0.90031004, 0.43524906, 0.752451539, -0.286675751, 0.59298712)
198
Camera7.Focus = CFrame.new(1.49800003, 33.0349998, -37.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
199
Camera7.focus = CFrame.new(1.49800003, 33.0349998, -37.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
200
for i,v in pairs(mas:GetChildren()) do
201
	v.Parent = script
202
	pcall(function() v:MakeJoints() end)
203
end
204
mas:Destroy()
205
for i,v in pairs(cors) do
206
	spawn(function()
207
		pcall(v)
208
	end)
209
end