Advertisement
SheeityArtist

FIJJET SPINNUH

Aug 5th, 2017
735
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.60 KB | None | 0 0
  1. ------------------
  2. --FIJJET SPINNUH--
  3. ------------------
  4. --By --
  5. --CKbackup-
  6. -----------
  7.  
  8. player = game.Players.LocalPlayer
  9. chara = player.Character
  10. debby = game.Debris
  11. Mouse = player:GetMouse()
  12. rs = game:GetService("RunService").RenderStepped
  13. speedo = 20
  14. mode = "Drop"
  15.  
  16. --Outfit--
  17. New = function(Object, Parent, Name, Data)
  18. local Object = Instance.new(Object)
  19. for Index, Value in pairs(Data or {}) do
  20. Object[Index] = Value
  21. end
  22. Object.Parent = Parent
  23. Object.Name = Name
  24. return Object
  25. end
  26.  
  27. SpinnerWeldBlock = New("Part",chara,"SpinnerWeldBlock",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.600000024, 0.200000003, 0.599999964),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  28. Weld = New("ManualWeld",SpinnerWeldBlock,"Weld",{Part0 = SpinnerWeldBlock,Part1 = chara["Right Arm"],C1 = CFrame.new(-0.200000763, -0.899999619, -0.600000143, 1, 0, 0, 0, 0, 1, -0, -1, -0),})
  29. FIJJETSPINNUH = New("Part",chara,"FIJJETSPINNUH",{BrickColor = BrickColor.new("Bright red"),Size = Vector3.new(1.4000001, 0.200000003, 1.39999998),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.768628, 0.156863, 0.109804),})
  30. FidgetSpinnerMesh = New("SpecialMesh",FIJJETSPINNUH,"FidgetSpinnerMesh",{Offset = Vector3.new(0, 0, -0.135000005),Scale = Vector3.new(3.5, 6, 3.5),MeshId = "rbxassetid://785024366",MeshType = Enum.MeshType.FileMesh,})
  31. SpinnerWeightOverlay = New("Decal",FIJJETSPINNUH,"SpinnerWeightOverlay",{Face = Enum.NormalId.Top,Texture = "rbxassetid://785492382",})
  32. FIJJETSPINNUHWELD = New("ManualWeld",FIJJETSPINNUH,"FIJJETSPINNUHWELD",{Part0 = FIJJETSPINNUH,Part1 = SpinnerWeldBlock,})
  33.  
  34. ScreenGui = New("ScreenGui",player.PlayerGui,"ScreenGui",{})
  35. Frame = New("Frame",ScreenGui,"Frame",{Size = UDim2.new(0, 150, 0, 200),Position = UDim2.new(1,0,.5,0),AnchorPoint = Vector2.new(1,0)})
  36. ColourLabel = New("TextLabel",Frame,"ColourLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Text = "Spinner BrickColor"})
  37. BrickColorBox = New("TextBox",Frame,"BrickColorBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.1,0),Text = "(BrickColor here)"})
  38. TextureBox = New("TextBox",Frame,"TextureBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.3,0),Text = "(Decal ID here)"})
  39. TextureLabel = New("TextLabel",Frame,"TextureLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.2,0),Text = "Spinner Texture"})
  40. RefTraLabel = New("TextLabel",Frame,"RefTraLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.4,0),Text = "Reflect/Transparent"})
  41. ReflectBox = New("TextBox",Frame,"ReflectBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.1,0,.5,0),Text = "0"})
  42. TransBox = New("TextBox",Frame,"TransBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.5,0,.5,0),Text = "0"})
  43. SpeedLabel = New("TextLabel",Frame,"SpeedLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.6,0),Text = "Spin Speed"})
  44. SpeedBox = New("TextBox",Frame,"SpeedBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.7,0),Text = "20"})
  45. ModeLabel = New("TextLabel",Frame,"ModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.8,0),Text = "Mode (Switch with Q or E)"})
  46. CurrentModeLabel = New("TextLabel",Frame,"CurrentModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.9,0),Text = "Drop"})
  47. CloseButton = New("TextButton",ScreenGui,"CloseButton",{Size = UDim2.new(0, 50, 0, 25),Position = UDim2.new(),AnchorPoint = Vector2.new(1,1),Position = UDim2.new(1,0,.5,0),Text = "Close"})
  48.  
  49. CloseButton.MouseButton1Click:connect(function()
  50. if Frame.Visible == true then
  51. Frame.Visible = false
  52. CloseButton.Text = "Open"
  53. elseif Frame.Visible == false then
  54. Frame.Visible = true
  55. CloseButton.Text = "Close"
  56. end
  57. end)
  58.  
  59. TextureBox.Changed:connect(function()
  60. sprayid=tonumber(tostring(TextureBox.Text)) or 0
  61. FidgetSpinnerMesh.TextureId = "http://www.roblox.com/asset/?id="..tostring(sprayid-1)
  62. end)
  63.  
  64. BrickColorBox.Changed:connect(function()
  65. FIJJETSPINNUH.BrickColor = BrickColor.new(BrickColorBox.Text)
  66. FidgetSpinnerMesh.TextureId = ""
  67. end)
  68.  
  69. ReflectBox.Changed:connect(function()
  70. FIJJETSPINNUH.Reflectance = ReflectBox.Text
  71. end)
  72.  
  73. TransBox.Changed:connect(function()
  74. FIJJETSPINNUH.Transparency = TransBox.Text
  75. end)
  76.  
  77. SpeedBox.Changed:connect(function()
  78. if SpeedBox.Text ~= "" then
  79. speedo = SpeedBox.Text
  80. end
  81. end)
  82.  
  83. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  84. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  85. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  86. local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
  87. return TEff
  88. end
  89.  
  90. --Clerp Animations--
  91. TC = chara.HumanoidRootPart.RootJoint
  92. HC = chara.Torso.Neck
  93. RAC = chara.Torso["Right Shoulder"]
  94. LAC = chara.Torso["Left Shoulder"]
  95. RLC = chara.Torso["Right Hip"]
  96. LLC = chara.Torso["Left Hip"]
  97. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  98. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  99. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  100. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  101. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  102. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  103. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  104. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  105. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  106. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  107. RW = Instance.new("Weld",HC.Parent)
  108. RW.Part1 = HC.Parent
  109. RW.Part0 = chara["Right Arm"]
  110. RW.C0 = RWF
  111.  
  112. function clerp(a,b,c)
  113. return a:lerp(b,c)
  114. end
  115.  
  116. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  117. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  118. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  119. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  120.  
  121. RW.C0 = RWF
  122.  
  123. --Idle Clerp--
  124. IRWF = (RWF - Vector3.new(-.2,-.8,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-10),0)
  125.  
  126. function res()
  127. RW.C0 = IRWF
  128. end
  129. res()
  130.  
  131. --Mouse Functions--
  132. function onKeyDown(key)
  133. if key == "q" then
  134. mode = "Drop"
  135. CurrentModeLabel.Text = mode
  136. elseif key == "e" then
  137. mode = "Throw"
  138. CurrentModeLabel.Text = mode
  139. end
  140. end
  141. function onButton1Down()
  142. if mode == "Drop" then
  143. local spinnah = FIJJETSPINNUH:Clone()
  144. spinnah.Parent = workspace
  145. spinnah.Position = FIJJETSPINNUH.Position
  146. spinnah:BreakJoints()
  147. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  148. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  149. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  150. debby:AddItem(spinnah,60)
  151. elseif mode == "Throw" then
  152. local spinnah = FIJJETSPINNUH:Clone()
  153. spinnah.Parent = workspace
  154. spinnah.Position = FIJJETSPINNUH.Position + chara.HumanoidRootPart.CFrame.lookVector*5
  155. spinnah:BreakJoints()
  156. debby:AddItem(spinnah,60)
  157. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  158. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  159. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  160. local faws = Instance.new("BodyForce",spinnah)
  161. faws.Force = Vector3.new(0,spinnah:GetMass()*workspace.Gravity,0)
  162. spinnah.Velocity = chara.HumanoidRootPart.CFrame.lookVector*speedo
  163. spinnah.Touched:connect(function(hit)
  164. if hit.Parent ~= chara and hit.Parent:FindFirstChild("Humanoid") and faws ~= nil then
  165. faws:Destroy()
  166. faws = nil
  167. hit.Parent:FindFirstChild("Humanoid").MaxHealth = 100
  168. hit.Parent:FindFirstChild("Humanoid").Health = hit.Parent:FindFirstChild("Humanoid").Health - math.random(10,20)
  169. spinf:Destroy()
  170. wait(5)
  171. for i = 0, 1, .1 do
  172. wait(.01)
  173. spinnah.Transparency = i
  174. end
  175. spinnah:Destroy()
  176. end
  177. end)
  178. end
  179. end
  180.  
  181. --Mouse Activation--
  182. if Mouse then
  183. Mouse.KeyDown:connect(onKeyDown)
  184. Mouse.Button1Down:connect(onButton1Down)
  185. end
  186.  
  187. --Loop--
  188. while true do
  189. rs:wait()
  190. FIJJETSPINNUHWELD.C0 = FIJJETSPINNUHWELD.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(speedo),0)
  191. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement